Read about our upcoming Code of Conduct on this issue

global.gitlab-ci.yml 2.15 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
    when:
      - unknown_failure
      - api_failure
      - runner_system_failure
12
13
      - job_execution_timeout
      - stuck_or_timeout_failure
Kamil Trzciński's avatar
Kamil Trzciński committed
14

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

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

36
.use-pg9:
Stan Hu's avatar
Stan Hu committed
37
  services:
38
    - name: postgres:9.6.17
Stan Hu's avatar
Stan Hu committed
39
40
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
41
42
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
Stan Hu's avatar
Stan Hu committed
43

44
.use-pg10:
45
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-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
46
  services:
47
    - name: postgres:10.12
Stan Hu's avatar
Stan Hu committed
48
49
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
50
51
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
52

53
54
.use-pg9-ee:
  services:
55
    - name: postgres:9.6.17
56
57
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
58
    - name: elasticsearch:6.4.2
59
60
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
61
62

.use-pg10-ee:
63
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
64
  services:
65
    - name: postgres:10.12
66
67
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
68
    - name: elasticsearch:6.4.2
69
70
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
71

72
.as-if-foss:
73
  variables:
74
    FOSS_ONLY: '1'