global.gitlab-ci.yml 2.93 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-pg9.6-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:
Stan Hu's avatar
Stan Hu committed
33
  services:
34
    - name: postgres:9.6.17
Stan Hu's avatar
Stan Hu committed
35
36
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
37
38
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
Stan Hu's avatar
Stan Hu committed
39

40
.use-pg10:
41
  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
42
  services:
43
    - name: postgres:10.12
Stan Hu's avatar
Stan Hu committed
44
45
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
46
47
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
48

49
.use-pg11:
50
  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"
51
52
53
54
55
56
57
  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

58
59
.use-pg9-ee:
  services:
60
    - name: postgres:9.6.17
61
62
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
63
    - name: elasticsearch:6.4.2
64
65
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
66
67

.use-pg10-ee:
68
  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"
69
  services:
70
    - name: postgres:10.12
71
72
      command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    - name: redis:alpine
73
    - name: elasticsearch:6.4.2
74
75
  variables:
    POSTGRES_HOST_AUTH_METHOD: trust
76

77
.use-pg11-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-11-graphicsmagick-1.3.34"
79
80
81
82
83
84
85
86
  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

87
.as-if-foss:
88
  variables:
89
    FOSS_ONLY: '1'