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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 04:45:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 04:45:44 +0300
commit85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch)
tree9160f299afd8c80c038f08e1545be119f5e3f1e1 /scripts/utils.sh
parent15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff)
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r--scripts/utils.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh
index f81e5c8982a..9d188fc7b77 100644
--- a/scripts/utils.sh
+++ b/scripts/utils.sh
@@ -35,6 +35,10 @@ function install_gitlab_gem() {
gem install gitlab --no-document --version 4.13.0
}
+function install_tff_gem() {
+ gem install test_file_finder --version 0.1.0
+}
+
function run_timed_command() {
local cmd="${1}"
local start=$(date +%s)
@@ -106,7 +110,7 @@ function get_job_id() {
let "page++"
done
- if [[ "${job_id}" == "" ]]; then
+ if [[ "${job_id}" == "null" ]]; then # jq prints "null" for non-existent attribute
echoerr "The '${job_name}' job ID couldn't be retrieved!"
else
echoinfo "The '${job_name}' job ID is ${job_id}"
@@ -133,3 +137,15 @@ function play_job() {
job_url=$(curl --silent --show-error --request POST --header "PRIVATE-TOKEN: ${api_token}" "${url}" | jq ".web_url")
echoinfo "Manual job '${job_name}' started at: ${job_url}"
}
+
+function fail_pipeline_early() {
+ local dont_interrupt_me_job_id
+ dont_interrupt_me_job_id=$(get_job_id 'dont-interrupt-me' 'scope=success')
+
+ if [[ -n "${dont_interrupt_me_job_id}" ]]; then
+ echoinfo "This pipeline cannot be interrupted due to \`dont-interrupt-me\` job ${dont_interrupt_me_job_id}"
+ else
+ echoinfo "Failing pipeline early for fast feedback due to test failures in rspec fail-fast."
+ curl --request POST --header "PRIVATE-TOKEN: ${GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN}" "https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/cancel"
+ fi
+}