Facilitates your local development workflows with Drone CI pipelines using Gitlab client. There's one for Github.
Here's a brief list of steps you need to take in order to start the automation infrastructure locally.
Simply run: (without the need of a running application on the port!)
$ ngrok http 80
This will start sharing your local http
protocol via port 80. You will receive an address like http://ada4e47d.ngrok.io
This is necessary in order to enable integration between locally-run Drone server and external Oauth2 providers such as Gitlab or Github.
Follow the tutorial about creating an application, name is not important, but /authorize
callback is.
When the application is created, save the values of Application ID
and Secret
.
Clone .env.example
file to .env
and modify it. Or create a new file .env
in the root folder. Set the appropriate values:
DRONE_HOST=http://ada4e47d.ngrok.io
DRONE_GITLAB_CLIENT=value of Application ID
DRONE_GITLAB_SECRET=value of Secret
DRONE_SECRET=value of your preference
Then, run the following:
$ docker-compose up
When the server is running, open http://ada4e47d.ngrok.io
in your browser and authorize the application.
When authorized, activate the project in the web UI.
This activation is necessary for you to be able to configure the secrets and make use of the hooks attached for changes to trigger builds in the Drone automation system.
check-config.sh script might help.