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 '.gitlab/ci/review-apps/rules.gitlab-ci.yml')
-rw-r--r--.gitlab/ci/review-apps/rules.gitlab-ci.yml69
1 files changed, 68 insertions, 1 deletions
diff --git a/.gitlab/ci/review-apps/rules.gitlab-ci.yml b/.gitlab/ci/review-apps/rules.gitlab-ci.yml
index 49343c98547..a3ae31cb14c 100644
--- a/.gitlab/ci/review-apps/rules.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/rules.gitlab-ci.yml
@@ -1,3 +1,6 @@
+# ------------------------------------------
+# Conditions
+# ------------------------------------------
# Specific specs passed
.specific-specs: &specific-specs
if: $QA_TESTS != ""
@@ -8,7 +11,7 @@
# No specific specs in mr pipeline
.all-specs-mr: &all-specs-mr
- if: $CI_MERGE_REQUEST_IID && $QA_TESTS == ""
+ if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $QA_TESTS == ""'
when: manual
# Triggered by change pattern
@@ -22,6 +25,31 @@
.default-branch: &default-branch
if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
+.if-merge-request: &if-merge-request
+ if: '$CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached"'
+
+.if-merge-request-labels-run-review-app: &if-merge-request-labels-run-review-app
+ if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-review-app/'
+
+.if-dot-com-ee-schedule-nightly-child-pipeline: &if-dot-com-ee-schedule-nightly-child-pipeline
+ if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab" && $CI_PIPELINE_SOURCE == "parent_pipeline" && $SCHEDULE_TYPE == "nightly"'
+
+# ------------------------------------------
+# Changes patterns
+# ------------------------------------------
+.ci-review-patterns: &ci-review-patterns
+ - ".gitlab-ci.yml"
+ - ".gitlab/ci/frontend.gitlab-ci.yml"
+ - ".gitlab/ci/build-images.gitlab-ci.yml"
+ - ".gitlab/ci/review.gitlab-ci.yml"
+ - ".gitlab/ci/review-apps/**/*"
+ - "scripts/review_apps/**/*"
+ - "scripts/trigger-build.rb"
+ - "{,ee/,jh/}{bin,config}/**/*.rb"
+
+# ------------------------------------------
+# Conditions set
+# ------------------------------------------
.qa-manual: &qa-manual
when: manual
allow_failure: true
@@ -53,6 +81,26 @@
when: manual
allow_failure: true
+.review:rules:review-build-cng:
+ rules:
+ - when: always
+
+.review:rules:review-delete-deployment:
+ rules:
+ - when: on_success
+
+# ------------------------------------------
+# Deploy
+# ------------------------------------------
+.review:rules:review-deploy:
+ rules:
+ - when: on_success
+
+.review:rules:trigger-review-stop:
+ rules:
+ - when: manual
+ allow_failure: true
+
# ------------------------------------------
# Test
# ------------------------------------------
@@ -91,6 +139,25 @@
- *all-specs-mr # set full suite to manual when no specific specs passed in mr
- if: $QA_SUITES =~ /Test::Instance::ReviewNonBlocking/
+.review:rules:review-performance:
+ rules:
+ - if: '$DAST_RUN == "true"' # Skip this job when DAST is run
+ when: never
+ - <<: *if-merge-request-labels-run-review-app # we explicitly don't allow the job to fail in that case
+ - <<: *if-merge-request # we explicitly don't allow the job to fail in that case
+ changes: *ci-review-patterns
+ - when: on_success
+ allow_failure: true
+
+# ------------------------------------------
+# DAST
+# ------------------------------------------
+.reports:rules:schedule-dast:
+ rules:
+ - if: '$DAST_DISABLED || $GITLAB_FEATURES !~ /\bdast\b/'
+ when: never
+ - <<: *if-dot-com-ee-schedule-nightly-child-pipeline
+
# ------------------------------------------
# Prepare/Report
# ------------------------------------------