blob: 535a8ca2e66d6319822ccab3cca58ab26d2d4fd2 (
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
###############################################
# Job configuration rules and defaults #
###############################################
default:
image: registry.gitlab.com/gitlab-org/gitlab-docs/base:alpine-3.16-ruby-2.7.6-0088e238
tags:
- gitlab-org
.bundle:
before_script:
- ruby --version
- gem --version
- bundle --version
- bundle config set --local deployment true # Install dependencies into ./vendor/bundle
- bundle install --jobs 4
cache:
key:
files:
- Gemfile.lock
paths:
- vendor/bundle
.bundle_and_yarn:
before_script:
- ruby --version
- gem --version
- bundle --version
- bundle config set --local deployment true # Install dependencies into ./vendor/bundle
- bundle install --jobs 4
- node --version
- yarn --version
- yarn install --frozen-lockfile --cache-folder .yarn-cache
cache:
key:
files:
- Gemfile.lock
- yarn.lock
paths:
- vendor/bundle
- .yarn-cache/
.yarn:
before_script:
- node --version
- yarn --version
- yarn install --frozen-lockfile --cache-folder .yarn-cache
cache:
key:
files:
- yarn.lock
paths:
- .yarn-cache/
#
# Retry a job automatically if it fails (2 times)
#
.retry:
retry: 2
#
# Rules to determine which pipelines jobs will run in.
#
.rules_scheduled:
rules:
- if: $CHORES_PIPELINE == "true" || $CLEAN_REVIEW_APPS_DAYS
when: never
- if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- if: '$PIPELINE_SCHEDULE_TIMING == "weekly"'
- if: '$PIPELINE_SCHEDULE_TIMING == "hourly"'
when: manual
allow_failure: true
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: manual
allow_failure: true
- if: '$CI_COMMIT_BRANCH == "main"'
when: manual
allow_failure: true
.rules_scheduled_manual:
rules:
- if: $CHORES_PIPELINE == "true" || $CLEAN_REVIEW_APPS_DAYS
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: manual
allow_failure: true
.rules_chores:
rules:
- if: '$CLEAN_REVIEW_APPS_DAYS'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CHORES_PIPELINE == "true"'
when: manual
allow_failure: true
.rules_site_tests:
rules:
- if: $CHORES_PIPELINE == "true" || $CLEAN_REVIEW_APPS_DAYS
when: never
# Don't run site tests for review apps.
- if: '$CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "trigger"'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_MERGE_REQUEST_ID'
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_COMMIT_BRANCH =~ /^\d{1,2}\.\d{1,2}$/'
.rules_global_nav_test:
rules:
- if: $CHORES_PIPELINE == "true" || $CLEAN_REVIEW_APPS_DAYS
when: never
- if: '$CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "trigger"'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_MERGE_REQUEST_ID'
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_COMMIT_BRANCH =~ /^\d{1,2}\.\d{1,2}$/'
.rules_prod:
rules:
- if: $CHORES_PIPELINE == "true" || $CLEAN_REVIEW_APPS_DAYS
when: never
# Don't deploy to production for trigerred pipelines (usually review apps)
- if: '$CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "trigger"'
when: never
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_COMMIT_BRANCH =~ /^\d{1,2}\.\d{1,2}$/'
.rules_dev:
rules:
- if: '$CI_MERGE_REQUEST_ID'
- if: '$CI_COMMIT_BRANCH =~ /docs-preview/' # TODO: Remove once no projects create such branch
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CHORES_PIPELINE == "true"'
.rules_upstream_review_app:
rules:
- if: '$CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "trigger"'
.rules_pages:
rules:
- if: $CHORES_PIPELINE == "true" || $CLEAN_REVIEW_APPS_DAYS
when: never
# Don't deploy to production for trigerred pipelines (usually review apps)
- if: '$CI_PIPELINE_SOURCE == "pipeline"|| $CI_PIPELINE_SOURCE == "trigger"'
when: never
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|