gitlab-ci: Set BUILD_ENV_OVERRIDE to customize the build
Long term reproducibility relies on being able to reproduce the build environment as closely as possible.
By setting the BUILD_ENV_OVERRIDE
file variable in the GitLab CI/CD
configuration when firing a pipeline it is possible to re-use the
contents stored in the build-env.txt
file from a previous build to
reproduce it.
To do so:
- find the
build-env.txt
file from the artifacts of the build to be reproduced - create a new branch in this repository pointing to the commit saved in
the
RECIPES_COMMIT
field ofbuild-env.txt
- go to
Pipelines
→Run Pipeline
page on GitLab - configure a variable of type
File
namedBUILD_ENV_OVERRIDE
- paste the contents of
build-env.txt
there - run the pipeline
For instance: https://gitlab.apertis.org/infrastructure/apertis-image-recipes/-/jobs/465767
Edited by Emanuele Aina