Skip to content

Ensure same Git references are used for building components on all OSs

What does this MR do?

On feature branch pipelines and nightly pipelines, versions of GitLab components point to master/main branches. Since this is a moving target, if jobs start at different times, there is a potential chance for different OS jobs to pull in different commits for building. This MR fixes that.

Changes:

  1. In the build-facts job which is run at the beginning of pipeilne, generate a version manifest file to get the commit SHAs of various components. To be on the safest side, we don't do this for tag pipelines and stable branch pipelines.
  2. Write these SHAs as build facts in build_facts/<component>_version files.
  3. When detecting version of a component, consider these build facts files before considering *VERSION files. Since these files won't exist for tag pipelines and stable branch pipelines, existing mechanism will prevail.

In addition, the MR does the following also:

  1. In build:component_shas, use the dedicated method for generating component shas.
  2. Drop the create_omnibus_manifest job in favor of generate-facts job, and make dependency scanning job use it.

Related issues

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for the GitLab Chart opened
Edited by Robert Marshall

Merge request reports