diff options
Diffstat (limited to 'cluster/prod/app/drone-ci/integration/README.md')
-rw-r--r-- | cluster/prod/app/drone-ci/integration/README.md | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/cluster/prod/app/drone-ci/integration/README.md b/cluster/prod/app/drone-ci/integration/README.md index b3c1cc6..ddd8530 100644 --- a/cluster/prod/app/drone-ci/integration/README.md +++ b/cluster/prod/app/drone-ci/integration/README.md @@ -26,25 +26,18 @@ curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compo chmod +x /usr/local/bin/docker-compose ``` -## Prepare the runner +## Install the runner -Nix folder must be populated before launching any build. +*This is our Nix runner version 2, previously we had another way to start Nix runners. This one has a proper way to handle concurrency, require less boilerplate, and should be safer and more idiomatic.* -```bash -docker run --rm -it -v /var/lib/drone/nix:/mnt nixpkgs/nix:nixos-21.05 cp -r /nix/{store,var} /mnt/ -``` - -This folder will grow over time and might need to be garbage collected. -As a rule of thumb, after running a full release of Garage, this folder will require 10GB. -Consider provisioning it with at least 20GB. - -## Launch the runner - -Because we use a shared nix folder, we set the number of concurrent builds to 1. -For more details and customizations, see `docker-compose.yml`. ```bash -DRONE_NAME=lheureduthe DRONE_OWNER=quentin DRONE_SECRET=xxx docker-compose up -d +wget https://git.deuxfleurs.fr/Deuxfleurs/infrastructure/raw/branch/main/app/drone-ci/integration/nix.conf +wget https://git.deuxfleurs.fr/Deuxfleurs/infrastructure/raw/branch/main/app/drone-ci/integration/docker-compose.yml + +# Edit the docker-compose.yml to adapt its variables to your needs, +# especially the capacitiy value and its name. +COMPOSE_PROJECT_NAME=drone DRONE_SECRET=xxx docker-compose up -d ``` That's all folks. @@ -67,6 +60,8 @@ It will give you the following result: ## Random note +*This part might be deprecated!* + This setup is done mainly to allow nix builds with some cache. To use the cache in Drone, you must set your repository as trusted. The command line tool does not work (it says it successfully set your repository as trusted but it did nothing): |