global.gitlab-ci.yml 3.27 KB
Newer Older
Stan Hu's avatar
Stan Hu committed
1
2
3
4
5
.default-tags:
  tags:
    - gitlab-org

.default-retry:
Kamil Trzciński's avatar
Kamil Trzciński committed
6
  retry:
Kamil Trzciński's avatar
Kamil Trzciński committed
7
    max: 2  # This is confusing but this means "3 runs at max".
Kamil Trzciński's avatar
Kamil Trzciński committed
8
9
10
11
12
    when:
      - unknown_failure
      - api_failure
      - runner_system_failure

Stan Hu's avatar
Stan Hu committed
13
14
15
16
17
18
.default-before_script:
  before_script:
    - date
    - source scripts/utils.sh
    - source scripts/prepare_build.sh
    - date
Kamil Trzciński's avatar
Kamil Trzciński committed
19
20

# Jobs that only need to pull cache
Stan Hu's avatar
Stan Hu committed
21
.default-cache:
Kamil Trzciński's avatar
Kamil Trzciński committed
22
  cache:
Stan Hu's avatar
Stan Hu committed
23
24
25
26
27
    key: "debian-stretch-ruby-2.6.3-node-12.x"
    paths:
      - vendor/ruby
      - .yarn-cache/
      - vendor/gitaly-ruby
Kamil Trzciński's avatar
Kamil Trzciński committed
28
29
    policy: pull

30
31
.default-only:
  only:
Philippe Lafoucrière's avatar
Philippe Lafoucrière committed
32
    refs:
33
34
35
36
37
      - master
      - /^[\d-]+-stable(-ee)?$/
      - /^\d+-\d+-auto-deploy-\d+$/
      - merge_requests
      - tags
Philippe Lafoucrière's avatar
Philippe Lafoucrière committed
38

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.only-code-changes:
  only:
    changes:
      - ".gitlab/ci/**/*"
      - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
      - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
      - ".csscomb.json"
      - "Dangerfile"
      - "Dockerfile.assets"
      - "*_VERSION"
      - "Gemfile{,.lock}"
      - "Rakefile"
      - "{babel.config,jest.config}.js"
      - "config.ru"
      - "{package.json,yarn.lock}"
      - "{app,bin,config,danger,db,ee,fixtures,haml_lint,lib,public,rubocop,scripts,spec,symbol,vendor}/**/*"
      - "doc/README.md"  # Some RSpec test rely on this file
Kamil Trzciński's avatar
Kamil Trzciński committed
56

57
58
59
60
61
.only-qa-changes:
  only:
    changes:
      - ".dockerignore"
      - "qa/**/*"
62

63
64
65
66
67
68
.only-docs-changes:
  only:
    changes:
      - ".gitlab/route-map.yml"
      - "doc/**/*"
      - ".markdownlint.json"
69

70
.only-code-qa-changes:
71
  only:
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
    changes:
      - ".gitlab/ci/**/*"
      - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
      - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
      - ".csscomb.json"
      - "Dangerfile"
      - "Dockerfile.assets"
      - "*_VERSION"
      - "Gemfile{,.lock}"
      - "Rakefile"
      - "{babel.config,jest.config}.js"
      - "config.ru"
      - "{package.json,yarn.lock}"
      - "{app,bin,config,danger,db,ee,fixtures,haml_lint,lib,public,rubocop,scripts,spec,symbol,vendor}/**/*"
      - "doc/README.md"  # Some RSpec test rely on this file
      - ".dockerignore"
      - "qa/**/*"

.only-review:
  only:
    variables:
      - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
94
95
96
97
98
    kubernetes: active
  except:
    refs:
      - master
      - /^\d+-\d+-auto-deploy-\d+$/
99
100
101
102
103
104

.only-review-schedules:
  only:
    refs:
      - schedules
    variables:
105
      - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
106
    kubernetes: active
Stan Hu's avatar
Stan Hu committed
107
108
109
110
111
112
113
114
115
116
117
118
119

.use-pg:
  services:
    - name: postgres:9.6.14
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine

.use-pg-10:
  image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.6.3-golang-1.11-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
  services:
    - name: postgres:10.9
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
120
121
122
123
124
125

.only-ee:
  only:
    variables:
      - $CI_PROJECT_NAME == "gitlab-ee"
      - $CI_PROJECT_NAME == "gitlab"  # New name of gitlab-ee after the single codebase migration