Skip to content
Snippets Groups Projects
Commit d18e514d84a8 authored by Balasankar 'Balu' C's avatar Balasankar 'Balu' C
Browse files

Merge branch 'pks-gitaly-generic-git-version-overrides' into 'master'

git: Make the Gitaly Git version override version-agnostic

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/6661



Merged-by: default avatarBalasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: default avatarDmytro Makovey <dmakovey@gitlab.com>
Approved-by: default avatarBalasankar 'Balu' C <balasankar@gitlab.com>
Co-authored-by: default avatarPatrick Steinhardt <psteinhardt@gitlab.com>
No related branches found
No related tags found
2 merge requests!102heptapod#1237: making 0.38 the new oldstable,!90Merged upstream 15.9.0+ce.0 into heptapod branch
......@@ -76,7 +76,16 @@
sm_version_override_git_repo_url = Gitlab::Util.get_env('SELF_MANAGED_VERSION_REGEX_OVERRIDE_GIT_REPO_URL')
git_repo_url = Gitlab::Util.get_env('GITALY_GIT_REPO_URL')
if Build::Check.is_auto_deploy_tag?
git_version_2_37_1 = Gitlab::Util.get_env('GITALY_GIT_VERSION_2_37_1')
git_version_2_38 = Gitlab::Util.get_env('GITALY_GIT_VERSION_2_38')
# Gitaly potentially bundles multiple different Git distributions with it.
# It is possible to override the specific version that Gitaly compiles each
# of these distributions with by setting:
#
# `GIT_VERSION_2_38=v2.38.1`
#
# As the bundled Git versions change over time we have this generic loop to
# just accept any such override into the environment used by make.
ENV.select { |k, v| k.start_with('GITALY_GIT_VERSION_') }.each do |k, v|
env[k.delete_prefix('GITALY_')] = v unless v&.empty?
end
env['GIT_REPO_URL'] = git_repo_url if git_repo_url
......@@ -81,8 +90,5 @@
env['GIT_REPO_URL'] = git_repo_url if git_repo_url
env['GIT_VERSION_2_37_1'] = git_version_2_37_1 if git_version_2_37_1
env['GIT_VERSION_2_38'] = git_version_2_38 if git_version_2_38
elsif sm_version_override_git_repo_url && Regexp.new(sm_version_override_git_repo_url).match?(Build::Info.gitlab_version)
env['GIT_REPO_URL'] = git_repo_url if git_repo_url
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment