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

.gitlab-ci.yml - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e889a9a2338cf601bdc7555b74f1cbc14eb6e8ef (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
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.18'
  VALE_VERSION: '2.29.6'
  MARKDOWNLINT_VERSION: '0.37.0'  # Version also set in package.json
  MARKDOWNLINT2_VERSION: '0.10.0'  # Version also set in package.json
  RUBY_VERSION: '3.2.2'
  ASDF_VERSION: '0.13.1'

#
# 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
    - 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 == "merge_request_event"'
      variables:
        DOCS_PROJECT_PIPELINE_TYPE: "MR pipeline: branch $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
        SEARCH_BACKEND: 'lunr'
    - 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" && $PIPELINE_SCHEDULE_TYPE == "chores"'
      variables:
        DOCS_PROJECT_PIPELINE_TYPE: "Cleanup chores pipeline"
    - 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_TYPE == "hourly_deploy"'
      variables:
        DOCS_PROJECT_PIPELINE_TYPE: "Hourly site deployment pipeline"
    - if: '$CI_PIPELINE_SOURCE == "trigger"'
      variables:
        DOCS_PROJECT_PIPELINE_TYPE: "Upstream review app pipeline"
        SEARCH_BACKEND: 'lunr'
    # 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"
    - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^\d{1,2}\.\d{1,2}$/'
      variables:
        DOCS_PROJECT_PIPELINE_TYPE: "Stable branch pipeline (backport)"