Skip to content

Respect GIT_REF env var when building KAS

Taka Nishida requested to merge inject-SHA-for-CNG-builds into master

This MR starts to respect GIT_REF that will be passed from CNG and Omnibus when they build KAS. GIT_REF will enable us to identify which commit the build is based on.

As we are enabling the rolling release of KAS, GITLAB_KAS_VERSION file in canonical GitLab project will be updated to SHA. But, since the VERSION file is not always updated by the release tools (it updates VERSION file only for public release), we can't identify which commit CNG and Omnibus builds are based on. With this MR, it will get the SHA from GIT_REF and it use it as GitRef in Gitlab-agent codebase.

Part of gitlab-com/gl-infra/delivery#20132 (closed).

FYI:

Example output:

$ cat VERSION
17.2.0-rc1

$ sh ./build/print_workspace_status.sh
STABLE_BUILD_VERSION v17.2.0-rc1
STABLE_BUILD_GIT_REF f9435609

$ GIT_REF=f943560913664907ed3e3f7c5ee217a928afb861 sh ./build/print_workspace_status.sh
STABLE_BUILD_VERSION v17.2.0-rc1
STABLE_BUILD_GIT_REF f943560913664907ed3e3f7c5ee217a928afb861
Edited by Taka Nishida

Merge request reports

Loading