global.gitlab-ci.yml 1.67 KB
Newer Older
Kamil Trzciński's avatar
Kamil Trzciński committed
1
2
.dedicated-runner:
  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
8
9
10
11
    when:
      - unknown_failure
      - api_failure
      - runner_system_failure
  tags:
    - gitlab-org

.default-cache: &default-cache
Lukas Eipert's avatar
Lukas Eipert committed
12
  key: "debian-stretch-ruby-2.6.3-node-12.x"
Kamil Trzciński's avatar
Kamil Trzciński committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  paths:
    - vendor/ruby
    - .yarn-cache/
    - vendor/gitaly-ruby

.dedicated-runner-default-cache:
  extends: .dedicated-runner
  cache:
    <<: *default-cache

# Jobs that only need to pull cache
.dedicated-pull-cache-job:
  extends: .dedicated-runner
  cache:
    <<: *default-cache
    policy: pull
  stage: test

31
.no-docs:
Kamil Trzciński's avatar
Kamil Trzciński committed
32
33
34
  except:
    - /(^docs[\/-].*|.*-docs$)/

35
36
37
38
39
.dedicated-no-docs-pull-cache-job:
  extends:
    - .dedicated-pull-cache-job
    - .no-docs

Kamil Trzciński's avatar
Kamil Trzciński committed
40
41
42
43
44
45
46
47
48
49
50
51
.dedicated-no-docs-and-no-qa-pull-cache-job:
  extends: .dedicated-pull-cache-job
  except:
    - /(^docs[\/-].*|.*-docs$)/
    - /(^qa[\/-].*|.*-qa$)/

# Jobs that do not need a DB
.dedicated-no-docs-no-db-pull-cache-job:
  extends: .dedicated-no-docs-pull-cache-job
  variables:
    SETUP_DB: "false"

52
53
54
55
56
57
# Jobs that need a dedicated runner, with no cache
.dedicated-no-docs:
  extends:
    - .dedicated-runner
    - .no-docs

Kamil Trzciński's avatar
Kamil Trzciński committed
58
59
.single-script-job-dedicated-runner:
  extends: .dedicated-runner
Stan Hu's avatar
Stan Hu committed
60
  image: ruby:2.6-alpine
Kamil Trzciński's avatar
Kamil Trzciński committed
61
62
63
64
65
66
67
68
69
70
71
72
  stage: test
  cache: {}
  dependencies: []
  variables:
    GIT_STRATEGY: none
  before_script:
    # We don't clone the repo by using GIT_STRATEGY: none and only download the
    # single script we need here so it's much faster than cloning.
    - export SCRIPT_NAME="${SCRIPT_NAME:-$CI_JOB_NAME}"
    - apk add --update openssl
    - wget $CI_PROJECT_URL/raw/$CI_COMMIT_SHA/scripts/$SCRIPT_NAME
    - chmod 755 $(basename $SCRIPT_NAME)