Giter Club home page Giter Club logo

gitea-environment's Introduction

gitea-environment

When running, the following applications will be available on your localhost:

Getting Started

Run:

./service.sh start

Then, load the following in your browser:

  • http://gitea:3000 - Configure and register for a Gitea account; database configuration may be left as-is
  • http://drone:8002 - Log in to Drone using the same credentials you used for your Gitea account

Create an SSH key to use with Gitea by running ssh-keygen from your terminal. When prompted for the name of the key file, use something like /Users/username/.ssh/gitea-local.

Then, add the following to your local host's ~/.ssh/config file:

Host gitea
HostName gitea
Port 222
User git
IdentityFile ~/.ssh/gitea-local

Finally, type cat ~/.ssh/gitea-local.pub from your terminal and copy-and-paste the output into a new SSH key in your Gitea account: http://gitea:3000/user/settings/keys

Trying It Out

Let's create a PHP project that we'll add to Gitea and then run tests for in Drone.

composer create-project ramsey/php-library-skeleton drone-test

Answer all the questions. When completed, cd drone-test/ and create a .drone.yml file with the following:

kind: pipeline
name: default

steps:
  - name: unit
    image: php:7.3-alpine
    commands:
      - curl -L -s -o composer.phar https://getcomposer.org/download/1.8.5/composer.phar
      - php --version
      - php composer.phar --version
      - php composer.phar install --no-interaction --prefer-dist --no-progress
      - php composer.phar run test-ci

Now, go to Gitea and create your repository: http://gitea:3000/repo/create. Name it "drone-test" in keeping with the examples here.

Log into Drone and click the "SYNC" button to load your repositories from Gitea. Click to activate your "drone-test" repository. Now, you're ready to push your repository to Gitea and watch the build run.

From your drone-test/ directory in your terminal, type the following:

git init
git add .
git commit -m "Initial commit"
git remote add origin git@gitea:ramsey/drone-test.git
git push -u origin master

If you've still got your Drone window visible, you should see it start to kick off a build.

Yay! ๐ŸŽ‰

gitea-environment's People

Contributors

ramsey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gitea-environment's Issues

Drone database issue

When logging in using oauth the drone container logs a database error:

{"level":"error","login":"Alex","msg":"cannot update user: Error 1406: Data too long for column 'user_oauth_token' at row 1","time":"2021-07-03T20:41:22Z"}

Turns out both user_oauth_token and user_oauth_refresh should be text columns.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.