Read about our upcoming Code of Conduct on this issue

global.gitlab-ci.yml 4.29 KB
Newer Older
Stan Hu's avatar
Stan Hu committed
1
.default-retry:
Kamil Trzciński's avatar
Kamil Trzciński committed
2
  retry:
Kamil Trzciński's avatar
Kamil Trzciński committed
3
    max: 2  # This is confusing but this means "3 runs at max".
Kamil Trzciński's avatar
Kamil Trzciński committed
4
5
6
7
    when:
      - unknown_failure
      - api_failure
      - runner_system_failure
8
9
      - job_execution_timeout
      - stuck_or_timeout_failure
Kamil Trzciński's avatar
Kamil Trzciński committed
10

Stan Hu's avatar
Stan Hu committed
11
12
13
.default-before_script:
  before_script:
    - date
14
    - '[ "$FOSS_ONLY" = "1" ] && rm -rf ee/ qa/spec/ee/ qa/qa/specs/features/ee/ qa/qa/ee/ qa/qa/ee.rb'
15
16
    - export GOPATH=$CI_PROJECT_DIR/.go
    - mkdir -p $GOPATH
Stan Hu's avatar
Stan Hu committed
17
18
19
    - source scripts/utils.sh
    - source scripts/prepare_build.sh
    - date
Kamil Trzciński's avatar
Kamil Trzciński committed
20
21

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

32
.use-pg9:
33
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-9.6-graphicsmagick-1.3.34"
Stan Hu's avatar
Stan Hu committed
34
  services:
35
    - name: postgres:9.6.17
Stan Hu's avatar
Stan Hu committed
36
37
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
38
39
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
40
41
  cache:
    key: "debian-stretch-ruby-2.6.5-pg9-node-12.x"
Stan Hu's avatar
Stan Hu committed
42

43
.use-pg10:
44
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
Stan Hu's avatar
Stan Hu committed
45
  services:
46
    - name: postgres:10.12
Stan Hu's avatar
Stan Hu committed
47
48
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
49
50
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
51
52
  cache:
    key: "debian-stretch-ruby-2.6.5-pg10-node-12.x"
53

54
.use-pg11:
55
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34"
56
57
58
59
60
61
  services:
    - name: postgres:11.6
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
62
63
  cache:
    key: "debian-stretch-ruby-2.6.5-pg11-node-12.x"
64

65
.use-pg9-ee:
66
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-9.6-graphicsmagick-1.3.34"
67
  services:
68
    - name: postgres:9.6.17
69
70
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
71
    - name: elasticsearch:6.4.2
72
73
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
74
75
  cache:
    key: "debian-stretch-ruby-2.6.5-pg9-node-12.x"
76
77

.use-pg10-ee:
78
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
79
  services:
80
    - name: postgres:10.12
81
82
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
83
    - name: elasticsearch:6.4.2
84
85
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
86
87
  cache:
    key: "debian-stretch-ruby-2.6.5-pg10-node-12.x"
88

89
.use-pg11-ee:
90
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34"
91
92
93
94
95
96
97
  services:
    - name: postgres:11.6
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
    - name: elasticsearch:6.4.2
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
98
99
  cache:
    key: "debian-stretch-ruby-2.6.5-pg11-node-12.x"
100

101
102
103
104
105
106
107
108
# Pin kaniko to v0.16.0 due to https://github.com/GoogleContainerTools/kaniko/issues/1162
.use-kaniko:
  image:
    name: gcr.io/kaniko-project/executor:debug-v0.16.0
    entrypoint: [""]
  before_script:
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json

109
.as-if-foss:
110
  variables:
111
    FOSS_ONLY: '1'
112
113
114
115
116
117
118
119
120
121
122
123

.use-docker-in-docker:
  image: docker:${DOCKER_VERSION}
  services:
    - docker:${DOCKER_VERSION}-dind
  variables:
    DOCKER_DRIVER: overlay2
    DOCKER_HOST: tcp://docker:2375
    DOCKER_TLS_CERTDIR: ""
  tags:
    # See https://gitlab.com/gitlab-com/www-gitlab-com/-/issues/7019 for tag descriptions
    - gitlab-org-docker