Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r--scripts/utils.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh
index 4a5e74353f6..5996fe7724c 100644
--- a/scripts/utils.sh
+++ b/scripts/utils.sh
@@ -196,7 +196,7 @@ function install_gitlab_gem() {
}
function install_tff_gem() {
- run_timed_command "gem install test_file_finder --no-document --version 0.1.4"
+ run_timed_command "gem install test_file_finder --no-document --version 0.2.1"
}
function install_activesupport_gem() {
@@ -453,3 +453,21 @@ function download_local_gems() {
rm "${output}"
done
}
+
+function define_trigger_branch_in_build_env() {
+ target_branch_name="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_COMMIT_REF_NAME}}"
+ stable_branch_regex="^[0-9-]+-stable(-ee)?$"
+
+ echo "target_branch_name: ${target_branch_name}"
+
+ if [[ $target_branch_name =~ $stable_branch_regex ]]
+ then
+ export TRIGGER_BRANCH="${target_branch_name%-ee}"
+ else
+ export TRIGGER_BRANCH=master
+ fi
+
+ if [ -f "$BUILD_ENV" ]; then
+ echo "TRIGGER_BRANCH=${TRIGGER_BRANCH}" >> $BUILD_ENV
+ fi
+}