Run drone-server on Cloudron
Go to file
Felix Bartels c9d632ecad add install steps
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-06-06 08:55:23 +02:00
.dockerignore add scripting to run agent 2020-06-05 22:36:50 +02:00
.gitignore add scripting to run agent 2020-06-05 22:36:50 +02:00
CloudronManifest.json Add scripting to run drone-server on Cloudron 2020-06-05 22:25:57 +02:00
docker-compose.yml readme and tweaks 2020-06-05 23:05:57 +02:00
Dockerfile Add scripting to run drone-server on Cloudron 2020-06-05 22:25:57 +02:00
Makefile Add scripting to run drone-server on Cloudron 2020-06-05 22:25:57 +02:00
README.md add install steps 2020-06-06 08:55:23 +02:00
run-agent.sh readme and tweaks 2020-06-05 23:05:57 +02:00
start.sh Add scripting to run drone-server on Cloudron 2020-06-05 22:25:57 +02:00
supervisor-drone-server.conf Add scripting to run drone-server on Cloudron 2020-06-05 22:25:57 +02:00

Drone CI for Cloudron

Run the Drone server on Cloudron and the agents locally.

I am using this setup together with a Gitea running on the same Cloudron installation.

Requirements

  • docker-compose
  • git
  • make
  • Cloudron CLI

Installation

  • Run make install to install the Drone server component at drone.yourdomain.com (yourdomain.com automatically adapts to your Cloudron setup)
  • Run make exec to open the cli of the app and modify .env so that it can connect to your Git instance
  • Run cloudron restart to restart the app and apply your changes
  • Verify that your setup works by going to https://drone.yourdomain.com
  • If all looks good run run-agent.sh to start the Drone agent on your local machine
  • Add the Drone configuration to your desired repositories

Tips and Tricks

I would also like to share some very useful commands. To install drone CLI, follow official docs.

Using drone-cli

Go to your user settings and get login information

export DRONE_SERVER=https://drone.9wd.eu
export DRONE_TOKEN=your token
drone info

Executing pipelines directly

You can also run pipelines directly with the Drone CLI:

drone exec --secret-file drone_secrets.yaml .drone.yml

A template for drone-secrets.yaml:

slack_url: https://hooks.slack.com/services/xxxxxxxxxxxx

Adding secrets through CLI

You can either add secrets through the web UI or use drone directly from your terminal:

drone secret add -repository username/repository-name --name foo --data bar --allow-pull-request

Inspiration

TODO

  • [*] remove commited secrets
  • [*] retrieve rpc secret from cloudron