From b97eb8d369e8a3e61cf7efffe184756fd75bad96 Mon Sep 17 00:00:00 2001 From: Vladimir Istyufeev Date: Wed, 1 Feb 2023 15:30:20 +0400 Subject: [PATCH] CI: Code mark to request a pipeline failure (#2158) --- scripts/ci/gitlab/pipeline/test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index 0db2bb554b0..2761ed6055d 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -1,6 +1,26 @@ # This file is part of .gitlab-ci.yml # Here are all jobs that are executed during "test" stage +# It's more like a check, but we want to run this job with real tests in parallel +find-fail-ci-phrase: + stage: test + variables: + CI_IMAGE: "paritytech/tools:latest" + ASSERT_REGEX: "FAIL-CI" + GIT_DEPTH: 1 + extends: + - .kubernetes-env + script: + - set +e + - rg --line-number --hidden --type rust --glob '!{.git,target}' "$ASSERT_REGEX" .; exit_status=$? + - if [ $exit_status -eq 0 ]; then + echo "$ASSERT_REGEX was found, exiting with 1"; + exit 1; + else + echo "No $ASSERT_REGEX was found, exiting with 0"; + exit 0; + fi + test-linux-stable: stage: test extends: