YAML fixes requiring TOML changes
Ciao Domenico,
this MR is only about the YAML file, but it requires that you also change the TOML and CI runner accordingly:
-
This builds the builder from scratch using ci-tools, rather than using the builder itself (which would be circular). If you do not want to enable shared runners (no need), you must do TWO things: first, in your TOML you need to allow the "gitlab-registry.cern.ch/ci-tools/docker-image-builder:latest" image, or even better set it as default; second, in the GitLab CI configuration, you must add the tag "docker-image-build" to the tags attached to your runners.
-
This also sets inside the YAML the four variables that you were previously setting in the TOML. So you can actually safely remove them from the TOML (but you do not need to do that I think). I just find it much clearer that the code itself is self-readable (you know where variables are set, there is nothing "hidden" in the TOML).
-
The TOML must also start builds in /scratch/builds and share /scratch with docker, as you suggested. This I did not change, but I added comments in the YAML to make this clearer.
For reference, the TOML I am using is
concurrent = 10
check_interval = 0
[session_server]
session_timeout = 3600
[[runners]]
name = "HEP workloads builder"
url = "https://gitlab.cern.ch/"
token = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
builds_dir = "/scratch/builds"
executor = "docker"
[runners.docker]
tls_verify = false
image = "gitlab-registry.cern.ch/ci-tools/docker-image-builder:latest"
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache","/var/run/docker.sock:/var/run/docker.sock","/scratch:/scratch"]
shm_size = 0
allowed_images = ["gitlab-registry.cern.ch/ci-tools/docker-image-builder:latest", "gitlab-registry.cern.ch/hep-benchmarks/hep-workloads/*", "gitlab-registry.cern.ch/giordano/hep-workloads/*", "gitlab-registry.cern.ch/valassi/hep-workloads/*"]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
Cheers Andrea