parent
76c59221d1
commit
71421f812c
2 changed files with 19 additions and 1 deletions
14
README.md
14
README.md
|
@ -45,7 +45,19 @@ docker run --rm -it dxflrs/albatros:xxx
|
|||
|
||||
where `xxx` is the commit sha you want.
|
||||
|
||||
## Builders
|
||||
## Bring Your Own Builder
|
||||
|
||||
One aspect that I don't like with traditional CI is that the way you can
|
||||
configure builds is very constrained by the vendor implementation choices.
|
||||
Like it or not, but Albatros has very few constraints in term of what build infrastructure should look like:
|
||||
- It must be a Nomad parameterized job
|
||||
- Your job must accept four mandatory meta parameters: `REPO_URL`, `COMMIT`, `BRANCH`, `FLAVOR`
|
||||
- Your job may receive a payload containing the secrets stored in your job definition (subject to change)
|
||||
- It must have have a task group named `runner` and, inside this group, a task named `executor`
|
||||
|
||||
And... that's basically all you need.
|
||||
|
||||
### A NixOS builder with local cache
|
||||
|
||||
Currently, we propose a single, nix-based builder.
|
||||
I am currently working on using proper caching on it.
|
||||
|
|
|
@ -86,6 +86,7 @@ fi
|
|||
#!/usr/bin/env bash
|
||||
set -euxo pipefail
|
||||
|
||||
# setup workspace
|
||||
mkdir /workspace
|
||||
cd /workspace
|
||||
git init
|
||||
|
@ -95,6 +96,11 @@ git checkout ${NOMAD_META_COMMIT} -b ${NOMAD_META_BRANCH}
|
|||
if [[ -s /var/run/secrets/albatros/secret.txt ]]; then
|
||||
export SECRET_PATH=/var/run/secrets/albatros/secret.txt
|
||||
fi
|
||||
|
||||
# wait for nix daemon during 120 seconds
|
||||
timeout -s 9 120 bash -c 'until nix store ping; do sleep 2; done'
|
||||
|
||||
# launch user's build
|
||||
./.albatros
|
||||
|
||||
EOH
|
||||
|
|
Loading…
Reference in a new issue