summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-03 15:10:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-03 15:10:11 +0000
commit4eef6c2c97b50f2305c561f0e1c6f0e14e661642 (patch)
tree03901d23471c6ad7984f8164297b13725adcd8fb /scripts
parentb9ae930d02bebaadcd6f019b59240f1304822ef8 (diff)
downloadgitlab-ce-4eef6c2c97b50f2305c561f0e1c6f0e14e661642.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/decomposition/generate-loose-foreign-key2
-rwxr-xr-xscripts/review_apps/review-apps.sh10
-rwxr-xr-xscripts/trigger-build.rb14
3 files changed, 20 insertions, 6 deletions
diff --git a/scripts/decomposition/generate-loose-foreign-key b/scripts/decomposition/generate-loose-foreign-key
index 3f4c510020a..2e91aa662de 100755
--- a/scripts/decomposition/generate-loose-foreign-key
+++ b/scripts/decomposition/generate-loose-foreign-key
@@ -253,7 +253,7 @@ end
# Show only cross-schema foreign keys
if $options[:cross_schema]
all_foreign_keys.select! do |definition|
- Gitlab::Database::GitlabSchema.table_schema(definition.from_table) != Gitlab::Database::GitlabSchema.table_schema(definition.to_table)
+ Gitlab::Database::GitlabSchema.table_schema!(definition.from_table) != Gitlab::Database::GitlabSchema.table_schema!(definition.to_table)
end
end
diff --git a/scripts/review_apps/review-apps.sh b/scripts/review_apps/review-apps.sh
index e185ed43e38..0217a539764 100755
--- a/scripts/review_apps/review-apps.sh
+++ b/scripts/review_apps/review-apps.sh
@@ -299,21 +299,21 @@ HELM_CMD=$(cat << EOF
--set global.appConfig.sentry.dsn="${REVIEW_APPS_SENTRY_DSN}" \
--set global.appConfig.sentry.environment="review" \
--set gitlab.migrations.image.repository="${gitlab_toolbox_image_repository}" \
- --set gitlab.migrations.image.tag="${CI_COMMIT_REF_SLUG}" \
+ --set gitlab.migrations.image.tag="${CI_COMMIT_SHA}" \
--set gitlab.gitaly.image.repository="${gitlab_gitaly_image_repository}" \
--set gitlab.gitaly.image.tag="${gitaly_image_tag}" \
--set gitlab.gitlab-shell.image.repository="${gitlab_shell_image_repository}" \
--set gitlab.gitlab-shell.image.tag="v${GITLAB_SHELL_VERSION}" \
--set gitlab.sidekiq.annotations.commit="${CI_COMMIT_SHORT_SHA}" \
--set gitlab.sidekiq.image.repository="${gitlab_sidekiq_image_repository}" \
- --set gitlab.sidekiq.image.tag="${CI_COMMIT_REF_SLUG}" \
+ --set gitlab.sidekiq.image.tag="${CI_COMMIT_SHA}" \
--set gitlab.webservice.annotations.commit="${CI_COMMIT_SHORT_SHA}" \
--set gitlab.webservice.image.repository="${gitlab_webservice_image_repository}" \
- --set gitlab.webservice.image.tag="${CI_COMMIT_REF_SLUG}" \
+ --set gitlab.webservice.image.tag="${CI_COMMIT_SHA}" \
--set gitlab.webservice.workhorse.image="${gitlab_workhorse_image_repository}" \
- --set gitlab.webservice.workhorse.tag="${CI_COMMIT_REF_SLUG}" \
+ --set gitlab.webservice.workhorse.tag="${CI_COMMIT_SHA}" \
--set gitlab.toolbox.image.repository="${gitlab_toolbox_image_repository}" \
- --set gitlab.toolbox.image.tag="${CI_COMMIT_REF_SLUG}"
+ --set gitlab.toolbox.image.tag="${CI_COMMIT_SHA}"
EOF
)
diff --git a/scripts/trigger-build.rb b/scripts/trigger-build.rb
index 411e5ed13c6..033c2e55329 100755
--- a/scripts/trigger-build.rb
+++ b/scripts/trigger-build.rb
@@ -184,6 +184,20 @@ module Trigger
true
end
+ def gitlab_ref_slug
+ if ENV['CI_COMMIT_TAG']
+ ENV['CI_COMMIT_REF_NAME']
+ else
+ ENV['CI_COMMIT_SHA']
+ end
+ end
+
+ def base_variables
+ super.merge(
+ 'GITLAB_REF_SLUG' => gitlab_ref_slug
+ )
+ end
+
def extra_variables
{
"TRIGGER_BRANCH" => ref,