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

rules.gitlab-ci.yml « ci « .gitlab - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0225fc01722eedd8b573655f5dbad2ff5effb90c (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
###############################################
#    Job configuration rules and defaults     #
###############################################

default:
  image: registry.gitlab.com/gitlab-org/gitlab-docs/base:alpine-3.16-ruby-3.0.5-2a7e4d1c
  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
  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
    - 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_docker_images:
  rules:
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Build docker images pipeline"'
      when: manual
      allow_failure: true

.rules_docker_image_tests:
  rules:
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Build docker images pipeline"'
    - if: '$DOCS_PROJECT_PIPELINE_TYPE =~ /^MR pipeline.*/'
      changes:
        - $DOCKERFILE

.rules_chores:
  rules:
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Cleanup chores pipeline"'
      when: manual
      allow_failure: true

.rules_site_tests:
  rules:
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Hourly site deployment pipeline"'
    - if: '$DOCS_PROJECT_PIPELINE_TYPE =~ /^MR pipeline.*/'
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Default branch pipeline"'
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Stable branch pipeline"'

.rules_prod:
  rules:
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Hourly site deployment pipeline"'
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Default branch pipeline"'
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Stable branch pipeline"'

.rules_dev:
  rules:
    - if: '$DOCS_PROJECT_PIPELINE_TYPE =~ /^MR pipeline.*/'
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Cleanup chores pipeline"'

.rules_upstream_review_app:
  rules:
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Upstream review app pipeline"'

.rules_pages:
  rules:
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Hourly site deployment pipeline"'
    - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Default branch pipeline"'