summaryrefslogtreecommitdiff
path: root/scripts/generate-e2e-pipeline
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-19 23:18:09 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-19 23:18:09 +0000
commit6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch)
treedc4d20fe6064752c0bd323187252c77e0a89144b /scripts/generate-e2e-pipeline
parent9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff)
downloadgitlab-ce-6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde.tar.gz
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'scripts/generate-e2e-pipeline')
-rwxr-xr-xscripts/generate-e2e-pipeline39
1 files changed, 39 insertions, 0 deletions
diff --git a/scripts/generate-e2e-pipeline b/scripts/generate-e2e-pipeline
new file mode 100755
index 00000000000..f541ae6665c
--- /dev/null
+++ b/scripts/generate-e2e-pipeline
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+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 $ENV_FILE
+
+echo "Generating child pipeline yml definitions for review-app and package-and-test child pipelines"
+
+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"
+ exit
+fi
+
+variables=$(cat <<YML
+variables:
+ GITLAB_VERSION: "$(cat VERSION)"
+ COLORIZED_LOGS: "true"
+ QA_TESTS: "$QA_TESTS"
+ QA_FEATURE_FLAGS: "${QA_FEATURE_FLAGS}"
+ QA_FRAMEWORK_CHANGES: "${QA_FRAMEWORK_CHANGES:-false}"
+ QA_SUITES: "$QA_SUITES"
+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 "Successfully generated review-app and package-and-test pipeline with following variables section:"
+echo "$variables"