blob: 36939a2b99000fe93f9104ef7be44cfd40cda759 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
include:
- project: gitlab-org/frontend/untamper-my-lockfile
file: templates/merge_request_pipelines.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml
- local: .gitlab/ci/*.gitlab-ci.yml
- project: 'gitlab-org/quality/pipeline-common'
file:
- '/ci/danger-review.yml'
stages:
- build
- security
- test
- pre-deploy
- build-images
- deploy
- post-deploy
variables:
BUNDLE_PATH__SYSTEM: 'false'
GIT_DEPTH: '20'
ALPINE_VERSION: '3.16'
VALE_VERSION: '2.23.0'
MARKDOWNLINT_VERSION: '0.33.0' # Version also set in package.json
MARKDOWNLINT2_VERSION: '0.6.0' # Version also set in package.json
RUBY_VERSION: '3.0.5'
#
# workflow:rules to prevent duplicate pipelines when pushing to a branch with an open MR.
#
workflow:
name: '$DOCS_PROJECT_PIPELINE_TYPE'
rules:
# 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"
SEARCH_BACKEND: 'algolia'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_REF_NAME =~ /gps/'
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"'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Monthly stopped environments cleanup pipeline"
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CHORES_PIPELINE == "true"'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Cleanup chores pipeline"
- if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_SCHEDULE_TIMING == "weekly"'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Build docker images pipeline"
- if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_SCHEDULE_TIMING == "hourly"'
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"
# Allow branch pipelines for the default branch and stable branches named XX.X
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Default branch pipeline"
- if: '$CI_COMMIT_BRANCH =~ /^\d{1,2}\.\d{1,2}$/'
variables:
DOCS_PROJECT_PIPELINE_TYPE: "Stable branch pipeline"
|