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>2023-05-17 19:05:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-17 19:05:49 +0300
commit43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch)
treedceebdc68925362117480a5d672bcff122fb625b /scripts/generate-e2e-pipeline
parent20c84b99005abd1c82101dfeff264ac50d2df211 (diff)
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'scripts/generate-e2e-pipeline')
-rwxr-xr-xscripts/generate-e2e-pipeline43
1 files changed, 30 insertions, 13 deletions
diff --git a/scripts/generate-e2e-pipeline b/scripts/generate-e2e-pipeline
index c612a700f90..3f30fb86ccc 100755
--- a/scripts/generate-e2e-pipeline
+++ b/scripts/generate-e2e-pipeline
@@ -5,44 +5,61 @@ set -e
# Script to generate e2e test child pipeline
# This is required because environment variables that are generated dynamically are not picked up by rules in child pipelines
+source "$(dirname "$0")/utils.sh"
source $ENV_FILE
-echo "Generating child pipeline yml definitions for review-app and package-and-test child pipelines"
+echoinfo "Generating child pipeline yml definitions for e2e test pipelines child pipelines"
+
+declare -A qa_pipelines
+
+# key/value pairs for qa pipeline yml definitions
+qa_pipelines["package-and-test-pipeline.yml"]="package-and-test/main.gitlab-ci.yml"
+qa_pipelines["package-and-test-nightly-pipeline.yml"]="package-and-test-nightly/main.gitlab-ci.yml"
+qa_pipelines["review-app-pipeline.yml"]="review-apps/main.gitlab-ci.yml"
+qa_pipelines["test-on-gdk-pipeline.yml"]="test-on-gdk/main.gitlab-ci.yml"
if [ "$QA_SKIP_ALL_TESTS" == "true" ]; then
skip_pipeline=".gitlab/ci/_skip.yml"
- echo "Using ${skip_pipeline} due to QA_SKIP_ALL_TESTS set to 'true'"
- cp $skip_pipeline "$OMNIBUS_PIPELINE_YML"
- cp $skip_pipeline "$REVIEW_PIPELINE_YML"
+ echoinfo "Using ${skip_pipeline} for all e2e test pipelines due to QA_SKIP_ALL_TESTS set to 'true'"
+ for key in "${!qa_pipelines[@]}"; do
+ cp $skip_pipeline "$key"
+ done
+
exit
fi
# set custom cache key to override default cache in pipeline-common because we use bundle to install gitlab-qa gem
qa_cache_key="qa-e2e-ruby-${RUBY_VERSION}-$(md5sum qa/Gemfile.lock | awk '{ print $1 }')"
+# these variables are used across all qa child pipelines
+# it allows to use all features across all child pipelines like skipping all tests, selective test execution etc
variables=$(cat <<YML
variables:
- COLORIZED_LOGS: "true"
GIT_DEPTH: "20"
GIT_STRATEGY: "clone" # 'GIT_STRATEGY: clone' optimizes the pack-objects cache hit ratio
GIT_SUBMODULE_STRATEGY: "none"
GITLAB_QA_CACHE_KEY: "$qa_cache_key"
- GITLAB_VERSION: "$(cat VERSION)"
+ GITLAB_SEMVER_VERSION: "$(cat VERSION)"
+ SKIP_OMNIBUS_TRIGGER: "false"
QA_EXPORT_TEST_METRICS: "${QA_EXPORT_TEST_METRICS:-true}"
QA_FEATURE_FLAGS: "${QA_FEATURE_FLAGS}"
QA_FRAMEWORK_CHANGES: "${QA_FRAMEWORK_CHANGES:-false}"
QA_RUN_ALL_TESTS: "${QA_RUN_ALL_TESTS:-false}"
+ QA_RUN_ALL_E2E_LABEL: "${QA_RUN_ALL_E2E_LABEL:-false}"
QA_SAVE_TEST_METRICS: "${QA_SAVE_TEST_METRICS:-false}"
QA_SUITES: "$QA_SUITES"
QA_TESTS: "$QA_TESTS"
YML
)
-echo "Using .gitlab/ci/review-apps/main.gitlab-ci.yml and .gitlab/ci/package-and-test/main.gitlab-ci.yml"
-cp .gitlab/ci/review-apps/main.gitlab-ci.yml "$REVIEW_PIPELINE_YML"
-echo "$variables" >>"$REVIEW_PIPELINE_YML"
-cp .gitlab/ci/package-and-test/main.gitlab-ci.yml "$OMNIBUS_PIPELINE_YML"
-echo "$variables" >>"$OMNIBUS_PIPELINE_YML"
+echo "***Saving generated qa pipeline files***"
+for key in "${!qa_pipelines[@]}"; do
+ echo "Generating $key"
+
+ cp ".gitlab/ci/${qa_pipelines[$key]}" "$key"
+
+ echo >>"$key" # add empty line so it's easier to read if debugging
+ echo "$variables" >>"$key"
+done
-echo "Successfully generated review-app and package-and-test pipeline with following variables section:"
-echo "$variables"
+echoinfo "Successfully generated qa pipeline files"