Skip to content

gitlab-ci: Set BUILD_ENV_OVERRIDE to customize the build

Emanuele Aina requested to merge wip/em/build-env-override into apertis/v2022dev0

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 of build-env.txt
  • go to PipelinesRun Pipeline page on GitLab
  • configure a variable of type File named BUILD_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

Merge request reports

Loading