Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2023-03-10 03:21:52 +0300
committerEvan Read <eread@gitlab.com>2023-03-10 03:21:52 +0300
commit3e843b1285a9eb501d11c28eaca130a0424e9f77 (patch)
tree23ac80a9602b0a8eed94fbfa36938db45ce73a16
parent34548ffa2fbc370375ed4536c52b14a359f0dac7 (diff)
parentd7578692fbfd086c62b722c475aaafafd26957c6 (diff)
Merge branch 'simplify-pipeline-rules-6' into 'main'
Final cleanup of pipeline code Closes #1324 and #1533 See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/3640 Merged-by: Evan Read <eread@gitlab.com> Approved-by: Evan Read <eread@gitlab.com> Co-authored-by: Marcel Amirault <mamirault@gitlab.com>
-rw-r--r--.gitlab-ci.yml18
-rw-r--r--.gitlab/ci/build-and-deploy.gitlab-ci.yml5
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml4
3 files changed, 7 insertions, 20 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 36939a2b..0ec8dbc4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,10 +36,6 @@ workflow:
# Prevent branch pipelines if an MR is open on the branch.
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS
when: never
- # Allow merge request and scheduled pipelines.
- - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- variables:
- DOCS_PROJECT_PIPELINE_TYPE: "MR pipeline: branch $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_REF_NAME =~ /algolia/'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "MR pipeline (Algolia): branch $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
@@ -48,21 +44,21 @@ workflow:
variables:
DOCS_PROJECT_PIPELINE_TYPE: "MR pipeline (Google): branch $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
SEARCH_BACKEND: 'google'
- - if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_SCHEDULE_TIMING == "monthly"'
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ variables:
+ DOCS_PROJECT_PIPELINE_TYPE: "MR pipeline: branch $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
+ - if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_SCHEDULE_TYPE == "delete_environments"'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Monthly stopped environments cleanup pipeline"
- - if: '$CI_PIPELINE_SOURCE == "schedule" && $CHORES_PIPELINE == "true"'
+ - if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_SCHEDULE_TYPE == "chores"'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Cleanup chores pipeline"
- - if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_SCHEDULE_TIMING == "weekly"'
+ - if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_SCHEDULE_TYPE == "docker"'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Build docker images pipeline"
- - if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_SCHEDULE_TIMING == "hourly"'
+ - if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_SCHEDULE_TYPE == "hourly_deploy"'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Hourly site deployment pipeline"
- - if: '$CI_PIPELINE_SOURCE == "pipeline"'
- variables:
- DOCS_PROJECT_PIPELINE_TYPE: "Pipeline source = pipeline"
- if: '$CI_PIPELINE_SOURCE == "trigger"'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Upstream review app pipeline"
diff --git a/.gitlab/ci/build-and-deploy.gitlab-ci.yml b/.gitlab/ci/build-and-deploy.gitlab-ci.yml
index a61648bc..13b0344b 100644
--- a/.gitlab/ci/build-and-deploy.gitlab-ci.yml
+++ b/.gitlab/ci/build-and-deploy.gitlab-ci.yml
@@ -117,7 +117,6 @@ review:
when: never
- if: '$DOCS_PROJECT_PIPELINE_TYPE =~ /^MR pipeline.*/'
- if: '$DOCS_PROJECT_PIPELINE_TYPE == "Upstream review app pipeline"'
- - if: '$CI_COMMIT_BRANCH =~ /docs-preview/' # TODO: Remove once no projects create such branch
#
# Stop the Review App
@@ -149,10 +148,6 @@ review_stop:
- if: '$DOCS_PROJECT_PIPELINE_TYPE == "Upstream review app pipeline"'
allow_failure: true
when: manual
- # TODO: Remove once no projects create such branch
- - if: '$CI_COMMIT_BRANCH =~ /docs-preview/'
- allow_failure: true
- when: manual
#
# Clean up stopped review app environments. Done once a month in a scheduled pipeline,
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 30a3fb13..0225fc01 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -96,7 +96,6 @@ default:
.rules_dev:
rules:
- if: '$DOCS_PROJECT_PIPELINE_TYPE =~ /^MR pipeline.*/'
- - if: '$CI_COMMIT_BRANCH =~ /docs-preview/' # TODO: Remove once no projects create such branch
- if: '$DOCS_PROJECT_PIPELINE_TYPE == "Cleanup chores pipeline"'
.rules_upstream_review_app:
@@ -105,8 +104,5 @@ default:
.rules_pages:
rules:
- # Don't deploy to production for trigerred pipelines (usually review apps)
- - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Upstream review app pipeline"'
- when: never
- if: '$DOCS_PROJECT_PIPELINE_TYPE == "Hourly site deployment pipeline"'
- if: '$DOCS_PROJECT_PIPELINE_TYPE == "Default branch pipeline"'