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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

327 lines
9.1 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:
2021-11-18 22:05:49 +05:30
- echo $FOSS_ONLY
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
2022-04-04 11:22:00 +05:30
key: "ruby-gems-${DEBIAN_VERSION}"
2021-06-08 01:23:25 +05:30
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
2022-04-04 11:22:00 +05:30
key: "gitaly-ruby-gems-${DEBIAN_VERSION}"
2021-06-08 01:23:25 +05:30
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.
2021-09-04 01:27:46 +05:30
.gitaly-binaries-cache: &gitaly-binaries-cache
key:
files:
- GITALY_SERVER_VERSION
2022-06-21 17:19:12 +05:30
- lib/gitlab/setup_helper.rb
2022-04-04 11:22:00 +05:30
prefix: "gitaly-binaries-${DEBIAN-VERSION}"
2021-09-04 01:27:46 +05:30
paths:
2022-06-21 17:19:12 +05:30
- ${TMP_TEST_FOLDER}/gitaly/_build/bin/
- ${TMP_TEST_FOLDER}/gitaly/_build/deps/git/install/
- ${TMP_TEST_FOLDER}/gitaly/config.toml
- ${TMP_TEST_FOLDER}/gitaly/gitaly2.config.toml
- ${TMP_TEST_FOLDER}/gitaly/internal/
- ${TMP_TEST_FOLDER}/gitaly/run/
- ${TMP_TEST_FOLDER}/gitaly/run2/
- ${TMP_TEST_FOLDER}/gitaly/Makefile
- ${TMP_TEST_FOLDER}/gitaly/praefect.config.toml
2022-07-16 23:28:13 +05:30
- ${TMP_TEST_FOLDER}/gitaly/praefect-db.config.toml
2022-06-21 17:19:12 +05:30
- ${TMP_TEST_FOLDER}/gitaly/ruby/
2021-09-04 01:27:46 +05:30
policy: pull
2021-06-08 01:23:25 +05:30
.go-pkg-cache: &go-pkg-cache
2022-04-04 11:22:00 +05:30
key: "go-pkg-${DEBIAN_VERSION}"
2021-06-08 01:23:25 +05:30
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
2022-04-04 11:22:00 +05:30
key: "node-modules-${DEBIAN_VERSION}-${NODE_ENV}"
2021-06-08 01:23:25 +05:30
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
2022-04-04 11:22:00 +05:30
key: "assets-${DEBIAN_VERSION}-${NODE_ENV}"
2021-06-08 01:23:25 +05:30
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.
2021-09-30 23:02:18 +05:30
.storybook-node-modules-cache: &storybook-node-modules-cache
2022-04-04 11:22:00 +05:30
key: "storybook-node-modules-${DEBIAN_VERSION}-${NODE_ENV}"
2021-09-30 23:02:18 +05:30
paths:
- storybook/node_modules/
policy: pull
.storybook-node-modules-cache-push: &storybook-node-modules-cache-push
<<: *storybook-node-modules-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
2021-06-08 01:23:25 +05:30
.rubocop-cache: &rubocop-cache
2022-04-04 11:22:00 +05:30
key: "rubocop-${DEBIAN_VERSION}"
2021-06-08 01:23:25 +05:30
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`.
2021-09-04 01:27:46 +05:30
policy: push
2021-06-08 01:23:25 +05:30
.qa-ruby-gems-cache: &qa-ruby-gems-cache
2022-07-16 23:28:13 +05:30
key:
files:
- qa/Gemfile.lock
2021-06-08 01:23:25 +05:30
paths:
2022-07-16 23:28:13 +05:30
- qa/vendor/ruby
2021-06-08 01:23:25 +05:30
policy: pull
.qa-ruby-gems-cache-push: &qa-ruby-gems-cache-push
<<: *qa-ruby-gems-cache
2022-07-16 23:28:13 +05:30
policy: pull-push
2021-06-08 01:23:25 +05:30
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
2021-09-04 01:27:46 +05:30
- *gitaly-binaries-cache
2021-06-08 01:23:25 +05:30
- *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-09-04 01:27:46 +05:30
.gitaly-binaries-cache-push:
cache:
- <<: *gitaly-binaries-cache
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
2021-12-11 22:18:48 +05:30
.ruby-cache:
cache:
- *ruby-gems-cache
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
2021-12-11 22:18:48 +05:30
.rubocop-job-cache:
cache:
- *ruby-gems-cache
- *rubocop-cache
.rubocop-job-cache-push:
2021-06-08 01:23:25 +05:30
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
2021-09-30 23:02:18 +05:30
.storybook-yarn-cache:
cache:
2021-11-18 22:05:49 +05:30
- *node-modules-cache
2021-09-30 23:02:18 +05:30
- *storybook-node-modules-cache
.storybook-yarn-cache-push:
cache:
2021-11-18 22:05:49 +05:30
- *node-modules-cache # We don't push this cache as it's already rebuilt by `update-yarn-cache`
2021-09-30 23:02:18 +05:30
- *storybook-node-modules-cache-push
2020-04-08 14:13:33 +05:30
.use-pg11:
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
2022-06-21 17:19:12 +05:30
PG_VERSION: "11"
2019-09-30 21:07:59 +05:30
2020-07-28 23:09:34 +05:30
.use-pg12:
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
2022-05-07 20:08:51 +05:30
- name: redis:6.0-alpine
2020-07-28 23:09:34 +05:30
variables:
POSTGRES_HOST_AUTH_METHOD: trust
2022-06-21 17:19:12 +05:30
PG_VERSION: "12"
2020-07-28 23:09:34 +05:30
2021-09-30 23:02:18 +05:30
.use-pg13:
services:
- name: postgres:13
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:5.0-alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
2022-06-21 17:19:12 +05:30
PG_VERSION: "13"
2021-09-30 23:02:18 +05:30
2020-04-08 14:13:33 +05:30
.use-pg11-ee:
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
2022-05-07 20:08:51 +05:30
- name: elasticsearch:7.17.0
2022-07-16 23:28:13 +05:30
command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"]
2020-04-08 14:13:33 +05:30
variables:
POSTGRES_HOST_AUTH_METHOD: trust
2022-06-21 17:19:12 +05:30
PG_VERSION: "11"
2020-04-22 19:07:51 +05:30
2020-07-28 23:09:34 +05:30
.use-pg12-ee:
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
2022-05-07 20:08:51 +05:30
- name: redis:6.0-alpine
- name: elasticsearch:7.17.0
2022-07-16 23:28:13 +05:30
command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"]
2021-09-30 23:02:18 +05:30
variables:
POSTGRES_HOST_AUTH_METHOD: trust
2022-06-21 17:19:12 +05:30
PG_VERSION: "12"
2021-09-30 23:02:18 +05:30
.use-pg13-ee:
services:
- name: postgres:13
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
2022-05-07 20:08:51 +05:30
- name: elasticsearch:7.17.0
2022-07-16 23:28:13 +05:30
command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"]
2020-07-28 23:09:34 +05:30
variables:
POSTGRES_HOST_AUTH_METHOD: trust
2022-06-21 17:19:12 +05:30
PG_VERSION: "13"
2020-07-28 23:09:34 +05:30
2022-07-16 23:28:13 +05:30
.use-pg12-es8-ee:
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:6.0-alpine
- name: elasticsearch:8.1.1
variables:
POSTGRES_HOST_AUTH_METHOD: trust
PG_VERSION: "12"
ES_SETTING_DISCOVERY_TYPE: "single-node"
ES_SETTING_XPACK_SECURITY_ENABLED: "false"
.use-pg12-opensearch1-ee:
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:6.0-alpine
- name: opensearchproject/opensearch:1.2.4
alias: elasticsearch
command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"]
variables:
POSTGRES_HOST_AUTH_METHOD: trust
PG_VERSION: "12"
2020-04-22 19:07:51 +05:30
.use-kaniko:
image:
2022-01-26 12:08:38 +05:30
name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/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