debian-mirror-gitlab/.gitlab/ci/global.gitlab-ci.yml

225 lines
6.5 KiB
YAML
Raw Normal View History

2019-12-04 20:38:33 +05:30
.default-retry:
2019-07-31 22:56:46 +05:30
retry:
2019-09-04 21:01:54 +05:30
max: 2 # This is confusing but this means "3 runs at max".
2019-07-31 22:56:46 +05:30
when:
- unknown_failure
- api_failure
- runner_system_failure
2020-03-13 15:44:24 +05:30
- job_execution_timeout
- stuck_or_timeout_failure
2019-07-31 22:56:46 +05:30
2019-12-04 20:38:33 +05:30
.default-before_script:
before_script:
2020-03-13 15:44:24 +05:30
- '[ "$FOSS_ONLY" = "1" ] && rm -rf ee/ qa/spec/ee/ qa/qa/specs/features/ee/ qa/qa/ee/ qa/qa/ee.rb'
2019-12-21 20:55:43 +05:30
- export GOPATH=$CI_PROJECT_DIR/.go
- mkdir -p $GOPATH
2019-12-04 20:38:33 +05:30
- source scripts/utils.sh
- source scripts/prepare_build.sh
2019-07-31 22:56:46 +05:30
2021-06-08 01:23:25 +05:30
.ruby-gems-cache: &ruby-gems-cache
key: "ruby-gems-v1"
paths:
- vendor/ruby/
policy: pull
.ruby-gems-cache-push: &ruby-gems-cache-push
<<: *ruby-gems-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
.gitaly-ruby-gems-cache: &gitaly-ruby-gems-cache
key: "gitaly-ruby-gems-v1"
paths:
- vendor/gitaly-ruby/
policy: pull
.gitaly-ruby-gems-cache-push: &gitaly-ruby-gems-cache-push
<<: *gitaly-ruby-gems-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
.go-pkg-cache: &go-pkg-cache
key: "go-pkg-v1"
paths:
- .go/pkg/mod/
policy: pull
.go-pkg-cache-push: &go-pkg-cache-push
<<: *go-pkg-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
.node-modules-cache: &node-modules-cache
key: "node-modules-${NODE_ENV}-v1"
paths:
- node_modules/
- tmp/cache/webpack-dlls/
policy: pull
.node-modules-cache-push: &node-modules-cache-push
<<: *node-modules-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
.assets-cache: &assets-cache
key: "assets-${NODE_ENV}-v1"
paths:
- assets-hash.txt
- public/assets/webpack/
- tmp/cache/assets/sprockets/
- tmp/cache/babel-loader/
- tmp/cache/vue-loader/
policy: pull
.assets-cache-push: &assets-cache-push
<<: *assets-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
.rubocop-cache: &rubocop-cache
key: "rubocop-v1"
paths:
- tmp/rubocop_cache/
policy: pull
.rubocop-cache-push: &rubocop-cache-push
<<: *rubocop-cache
# We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up but RuboCop has a mechanism
# for keeping only the N latest cache files, so we take advantage of it with `pull-push`.
policy: pull-push
.qa-ruby-gems-cache: &qa-ruby-gems-cache
key: "qa-ruby-gems-v1"
paths:
- qa/vendor/ruby/
policy: pull
.qa-ruby-gems-cache-push: &qa-ruby-gems-cache-push
<<: *qa-ruby-gems-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
2021-03-11 19:13:27 +05:30
.setup-test-env-cache:
2019-07-31 22:56:46 +05:30
cache:
2021-06-08 01:23:25 +05:30
- *ruby-gems-cache
- *gitaly-ruby-gems-cache
- *go-pkg-cache
.setup-test-env-cache-push:
cache:
- *ruby-gems-cache-push
- *gitaly-ruby-gems-cache-push
- *go-pkg-cache-push
2019-07-31 22:56:46 +05:30
2021-03-11 19:13:27 +05:30
.rails-cache:
cache:
2021-06-08 01:23:25 +05:30
- *ruby-gems-cache
- *gitaly-ruby-gems-cache
2021-03-11 19:13:27 +05:30
2020-06-23 00:09:42 +05:30
.static-analysis-cache:
cache:
2021-06-08 01:23:25 +05:30
- *ruby-gems-cache
- *node-modules-cache
- *rubocop-cache
.static-analysis-cache-push:
cache:
- *ruby-gems-cache # We don't push this cache as it's already rebuilt by `update-setup-test-env-cache`
- *rubocop-cache-push
2020-06-23 00:09:42 +05:30
2021-01-03 14:25:43 +05:30
.coverage-cache:
cache:
2021-06-08 01:23:25 +05:30
- *ruby-gems-cache
2021-01-03 14:25:43 +05:30
2021-04-17 20:07:23 +05:30
.danger-review-cache:
cache:
2021-06-08 01:23:25 +05:30
- *ruby-gems-cache
- *node-modules-cache
2021-04-17 20:07:23 +05:30
2020-06-23 00:09:42 +05:30
.qa-cache:
2020-04-22 19:07:51 +05:30
cache:
2021-06-08 01:23:25 +05:30
- *qa-ruby-gems-cache
.qa-cache-push:
cache:
- *qa-ruby-gems-cache-push
2019-12-21 20:55:43 +05:30
2020-05-24 23:13:21 +05:30
.yarn-cache:
2020-04-22 19:07:51 +05:30
cache:
2021-06-08 01:23:25 +05:30
- *node-modules-cache
.yarn-cache-push:
cache:
- *node-modules-cache-push
2020-06-23 00:09:42 +05:30
.assets-compile-cache:
cache:
2021-06-08 01:23:25 +05:30
- *ruby-gems-cache
- *node-modules-cache
- *assets-cache
.assets-compile-cache-push:
cache:
- *ruby-gems-cache # We don't push this cache as it's already rebuilt by `update-setup-test-env-cache`
- *node-modules-cache-push
- *assets-cache-push
2019-07-31 22:56:46 +05:30
2020-04-08 14:13:33 +05:30
.use-pg11:
2021-04-29 21:17:54 +05:30
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36"
2020-04-08 14:13:33 +05:30
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
2021-03-11 19:13:27 +05:30
- name: redis:5.0-alpine
2020-04-08 14:13:33 +05:30
variables:
POSTGRES_HOST_AUTH_METHOD: trust
2019-09-30 21:07:59 +05:30
2020-07-28 23:09:34 +05:30
.use-pg12:
2021-04-29 21:17:54 +05:30
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36"
2020-07-28 23:09:34 +05:30
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
2021-03-11 19:13:27 +05:30
- name: redis:5.0-alpine
2020-07-28 23:09:34 +05:30
variables:
POSTGRES_HOST_AUTH_METHOD: trust
2020-04-08 14:13:33 +05:30
.use-pg11-ee:
2021-04-29 21:17:54 +05:30
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36"
2020-04-08 14:13:33 +05:30
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
2021-03-11 19:13:27 +05:30
- name: redis:5.0-alpine
2021-04-17 20:07:23 +05:30
- name: elasticsearch:7.11.1
2021-01-03 14:25:43 +05:30
command: ["elasticsearch", "-E", "discovery.type=single-node"]
2020-04-08 14:13:33 +05:30
variables:
POSTGRES_HOST_AUTH_METHOD: trust
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
.use-pg12-ee:
2021-04-29 21:17:54 +05:30
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36"
2020-07-28 23:09:34 +05:30
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
2021-03-11 19:13:27 +05:30
- name: redis:5.0-alpine
2021-04-17 20:07:23 +05:30
- name: elasticsearch:7.11.1
2021-01-03 14:25:43 +05:30
command: ["elasticsearch", "-E", "discovery.type=single-node"]
2020-07-28 23:09:34 +05:30
variables:
POSTGRES_HOST_AUTH_METHOD: trust
2020-04-22 19:07:51 +05:30
.use-kaniko:
image:
2021-06-08 01:23:25 +05:30
name: registry.gitlab.com/gitlab-org/gitlab-build-images:kaniko
2020-04-22 19:07:51 +05:30
entrypoint: [""]
before_script:
2020-06-23 00:09:42 +05:30
- source scripts/utils.sh
2020-05-24 23:13:21 +05:30
- mkdir -p /kaniko/.docker
2020-04-22 19:07:51 +05:30
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
2020-04-08 14:13:33 +05:30
2020-03-13 15:44:24 +05:30
.as-if-foss:
2019-12-21 20:55:43 +05:30
variables:
FOSS_ONLY: '1'
2020-04-22 19:07:51 +05:30
.use-docker-in-docker:
2021-03-11 19:13:27 +05:30
image: ${GITLAB_DEPENDENCY_PROXY}docker:${DOCKER_VERSION}
2020-04-22 19:07:51 +05:30
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