2019-08-26 16:41:55 -04:00
|
|
|
.default-retry:
|
2019-04-12 04:56:38 -04:00
|
|
|
retry:
|
2019-06-05 12:31:35 -04:00
|
|
|
max: 2 # This is confusing but this means "3 runs at max".
|
2019-04-12 04:56:38 -04:00
|
|
|
when:
|
|
|
|
- unknown_failure
|
|
|
|
- api_failure
|
|
|
|
- runner_system_failure
|
2020-02-06 04:09:06 -05:00
|
|
|
- job_execution_timeout
|
|
|
|
- stuck_or_timeout_failure
|
2019-04-12 04:56:38 -04:00
|
|
|
|
2019-08-26 16:41:55 -04:00
|
|
|
.default-before_script:
|
|
|
|
before_script:
|
2021-10-13 17:09:56 -04:00
|
|
|
- echo $FOSS_ONLY
|
2020-01-23 07:08:38 -05:00
|
|
|
- '[ "$FOSS_ONLY" = "1" ] && rm -rf ee/ qa/spec/ee/ qa/qa/specs/features/ee/ qa/qa/ee/ qa/qa/ee.rb'
|
2019-09-24 11:06:34 -04:00
|
|
|
- export GOPATH=$CI_PROJECT_DIR/.go
|
|
|
|
- mkdir -p $GOPATH
|
2019-08-26 16:41:55 -04:00
|
|
|
- source scripts/utils.sh
|
|
|
|
- source scripts/prepare_build.sh
|
2019-04-12 04:56:38 -04:00
|
|
|
|
2021-05-18 08:10:26 -04:00
|
|
|
.ruby-gems-cache: &ruby-gems-cache
|
2022-02-15 01:17:51 -05:00
|
|
|
key: "ruby-gems-${DEBIAN_VERSION}"
|
2021-05-18 08:10:26 -04:00
|
|
|
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-02-15 01:17:51 -05:00
|
|
|
key: "gitaly-ruby-gems-${DEBIAN_VERSION}"
|
2021-05-18 08:10:26 -04:00
|
|
|
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-06-11 11:09:58 -04:00
|
|
|
.gitaly-binaries-cache: &gitaly-binaries-cache
|
|
|
|
key:
|
|
|
|
files:
|
|
|
|
- GITALY_SERVER_VERSION
|
2022-02-15 01:17:51 -05:00
|
|
|
prefix: "gitaly-binaries-${DEBIAN-VERSION}"
|
2021-06-11 11:09:58 -04:00
|
|
|
paths:
|
|
|
|
- tmp/tests/gitaly/_build/bin/
|
2021-10-22 08:09:12 -04:00
|
|
|
- tmp/tests/gitaly/_build/deps/git/install/
|
2021-06-11 11:09:58 -04:00
|
|
|
- tmp/tests/gitaly/config.toml
|
|
|
|
- tmp/tests/gitaly/gitaly2.config.toml
|
|
|
|
- tmp/tests/gitaly/internal/
|
|
|
|
- tmp/tests/gitaly/internal_gitaly2/
|
|
|
|
- tmp/tests/gitaly/internal_sockets/
|
|
|
|
- tmp/tests/gitaly/Makefile
|
|
|
|
- tmp/tests/gitaly/praefect.config.toml
|
|
|
|
- tmp/tests/gitaly/ruby/
|
|
|
|
policy: pull
|
|
|
|
|
2021-05-18 08:10:26 -04:00
|
|
|
.go-pkg-cache: &go-pkg-cache
|
2022-02-15 01:17:51 -05:00
|
|
|
key: "go-pkg-${DEBIAN_VERSION}"
|
2021-05-18 08:10:26 -04:00
|
|
|
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-02-15 01:17:51 -05:00
|
|
|
key: "node-modules-${DEBIAN_VERSION}-${NODE_ENV}"
|
2021-05-18 08:10:26 -04:00
|
|
|
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-02-15 01:17:51 -05:00
|
|
|
key: "assets-${DEBIAN_VERSION}-${NODE_ENV}"
|
2021-05-18 08:10:26 -04:00
|
|
|
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-06-18 08:10:03 -04:00
|
|
|
.storybook-node-modules-cache: &storybook-node-modules-cache
|
2022-02-15 01:17:51 -05:00
|
|
|
key: "storybook-node-modules-${DEBIAN_VERSION}-${NODE_ENV}"
|
2021-06-18 08:10:03 -04:00
|
|
|
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-05-18 08:10:26 -04:00
|
|
|
.rubocop-cache: &rubocop-cache
|
2022-02-15 01:17:51 -05:00
|
|
|
key: "rubocop-${DEBIAN_VERSION}"
|
2021-05-18 08:10:26 -04:00
|
|
|
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-06-02 08:10:05 -04:00
|
|
|
policy: push
|
2021-05-18 08:10:26 -04:00
|
|
|
|
|
|
|
.qa-ruby-gems-cache: &qa-ruby-gems-cache
|
2022-02-15 01:17:51 -05:00
|
|
|
key: "qa-ruby-gems-${DEBIAN_VERSION}"
|
2021-05-18 08:10:26 -04:00
|
|
|
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-02-02 01:09:47 -05:00
|
|
|
.setup-test-env-cache:
|
2019-04-12 04:56:38 -04:00
|
|
|
cache:
|
2021-05-18 08:10:26 -04:00
|
|
|
- *ruby-gems-cache
|
|
|
|
- *gitaly-ruby-gems-cache
|
2021-06-11 11:09:58 -04:00
|
|
|
- *gitaly-binaries-cache
|
2021-05-18 08:10:26 -04:00
|
|
|
- *go-pkg-cache
|
|
|
|
|
|
|
|
.setup-test-env-cache-push:
|
|
|
|
cache:
|
|
|
|
- *ruby-gems-cache-push
|
|
|
|
- *gitaly-ruby-gems-cache-push
|
|
|
|
- *go-pkg-cache-push
|
2019-04-12 04:56:38 -04:00
|
|
|
|
2021-06-11 11:09:58 -04:00
|
|
|
.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-11-01 05:13:14 -04:00
|
|
|
.ruby-cache:
|
|
|
|
cache:
|
|
|
|
- *ruby-gems-cache
|
|
|
|
|
2021-02-02 01:09:47 -05:00
|
|
|
.rails-cache:
|
|
|
|
cache:
|
2021-05-18 08:10:26 -04:00
|
|
|
- *ruby-gems-cache
|
|
|
|
- *gitaly-ruby-gems-cache
|
2021-02-02 01:09:47 -05:00
|
|
|
|
2020-06-02 08:08:33 -04:00
|
|
|
.static-analysis-cache:
|
|
|
|
cache:
|
2021-05-18 08:10:26 -04:00
|
|
|
- *ruby-gems-cache
|
|
|
|
- *node-modules-cache
|
|
|
|
- *rubocop-cache
|
|
|
|
|
2021-11-01 05:13:14 -04:00
|
|
|
.rubocop-job-cache:
|
|
|
|
cache:
|
|
|
|
- *ruby-gems-cache
|
|
|
|
- *rubocop-cache
|
|
|
|
|
|
|
|
.rubocop-job-cache-push:
|
2021-05-18 08:10:26 -04:00
|
|
|
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-02 08:08:33 -04:00
|
|
|
|
2020-09-22 08:09:39 -04:00
|
|
|
.coverage-cache:
|
|
|
|
cache:
|
2021-05-18 08:10:26 -04:00
|
|
|
- *ruby-gems-cache
|
2020-09-22 08:09:39 -04:00
|
|
|
|
2021-03-12 07:09:33 -05:00
|
|
|
.danger-review-cache:
|
|
|
|
cache:
|
2021-05-18 08:10:26 -04:00
|
|
|
- *ruby-gems-cache
|
|
|
|
- *node-modules-cache
|
2021-03-12 07:09:33 -05:00
|
|
|
|
2020-06-02 08:08:33 -04:00
|
|
|
.qa-cache:
|
2020-05-19 05:08:12 -04:00
|
|
|
cache:
|
2021-05-18 08:10:26 -04:00
|
|
|
- *qa-ruby-gems-cache
|
|
|
|
|
|
|
|
.qa-cache-push:
|
|
|
|
cache:
|
|
|
|
- *qa-ruby-gems-cache-push
|
2020-05-19 05:08:12 -04:00
|
|
|
|
2020-05-11 11:09:37 -04:00
|
|
|
.yarn-cache:
|
|
|
|
cache:
|
2021-05-18 08:10:26 -04:00
|
|
|
- *node-modules-cache
|
|
|
|
|
|
|
|
.yarn-cache-push:
|
|
|
|
cache:
|
|
|
|
- *node-modules-cache-push
|
2020-06-02 08:08:33 -04:00
|
|
|
|
|
|
|
.assets-compile-cache:
|
|
|
|
cache:
|
2021-05-18 08:10:26 -04:00
|
|
|
- *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
|
2020-05-11 11:09:37 -04:00
|
|
|
|
2021-06-18 08:10:03 -04:00
|
|
|
.storybook-yarn-cache:
|
|
|
|
cache:
|
2021-09-30 02:09:27 -04:00
|
|
|
- *node-modules-cache
|
2021-06-18 08:10:03 -04:00
|
|
|
- *storybook-node-modules-cache
|
|
|
|
|
|
|
|
.storybook-yarn-cache-push:
|
|
|
|
cache:
|
2021-09-30 02:09:27 -04:00
|
|
|
- *node-modules-cache # We don't push this cache as it's already rebuilt by `update-yarn-cache`
|
2021-06-18 08:10:03 -04:00
|
|
|
- *storybook-node-modules-cache-push
|
|
|
|
|
2021-06-15 08:10:11 -04:00
|
|
|
.use-pg11:
|
2022-02-15 01:17:51 -05:00
|
|
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-${DEBIAN_VERSION}-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36
|
2021-06-15 08:10:11 -04:00
|
|
|
services:
|
|
|
|
- name: postgres:11.6
|
|
|
|
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
|
|
|
|
|
2020-07-09 08:08:56 -04:00
|
|
|
.use-pg12:
|
2022-02-15 01:17:51 -05:00
|
|
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-${DEBIAN_VERSION}-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36
|
2020-07-09 08:08:56 -04:00
|
|
|
services:
|
|
|
|
- name: postgres:12
|
|
|
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
2022-03-04 04:16:29 -05:00
|
|
|
- name: redis:6.0-alpine
|
2020-07-09 08:08:56 -04:00
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
|
|
|
2021-07-08 05:09:33 -04:00
|
|
|
.use-pg13:
|
2022-02-15 01:17:51 -05:00
|
|
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-${DEBIAN_VERSION}-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-13-graphicsmagick-1.3.36
|
2021-07-08 05:09:33 -04:00
|
|
|
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
|
|
|
|
|
2021-06-15 08:10:11 -04:00
|
|
|
.use-pg11-ee:
|
2022-02-15 01:17:51 -05:00
|
|
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-${DEBIAN_VERSION}-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36
|
2021-06-15 08:10:11 -04:00
|
|
|
services:
|
|
|
|
- name: postgres:11.6
|
|
|
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
|
|
|
- name: redis:5.0-alpine
|
2022-02-22 01:16:10 -05:00
|
|
|
- name: elasticsearch:7.17.0
|
2021-06-15 08:10:11 -04:00
|
|
|
command: ["elasticsearch", "-E", "discovery.type=single-node"]
|
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
|
|
|
2020-07-09 08:08:56 -04:00
|
|
|
.use-pg12-ee:
|
2022-02-15 01:17:51 -05:00
|
|
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-${DEBIAN_VERSION}-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36
|
2020-07-09 08:08:56 -04:00
|
|
|
services:
|
|
|
|
- name: postgres:12
|
|
|
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
2022-03-04 04:16:29 -05:00
|
|
|
- name: redis:6.0-alpine
|
2022-02-22 01:16:10 -05:00
|
|
|
- name: elasticsearch:7.17.0
|
2021-07-08 05:09:33 -04:00
|
|
|
command: ["elasticsearch", "-E", "discovery.type=single-node"]
|
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
|
|
|
|
|
|
.use-pg13-ee:
|
2022-02-15 01:17:51 -05:00
|
|
|
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:debian-${DEBIAN_VERSION}-ruby-2.7.patched-golang-1.16-git-2.33-lfs-2.9-chrome-97-node-14.15-yarn-1.22-postgresql-13-graphicsmagick-1.3.36
|
2021-07-08 05:09:33 -04:00
|
|
|
services:
|
|
|
|
- name: postgres:13
|
|
|
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
2021-01-28 04:09:07 -05:00
|
|
|
- name: redis:5.0-alpine
|
2022-02-22 01:16:10 -05:00
|
|
|
- name: elasticsearch:7.17.0
|
2020-10-12 11:08:32 -04:00
|
|
|
command: ["elasticsearch", "-E", "discovery.type=single-node"]
|
2020-07-09 08:08:56 -04:00
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
|
|
|
2020-04-21 11:21:10 -04:00
|
|
|
.use-kaniko:
|
|
|
|
image:
|
2021-12-14 13:11:35 -05:00
|
|
|
name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:kaniko
|
2020-04-21 11:21:10 -04:00
|
|
|
entrypoint: [""]
|
|
|
|
before_script:
|
2020-06-02 08:08:33 -04:00
|
|
|
- source scripts/utils.sh
|
2020-05-18 23:08:11 -04:00
|
|
|
- mkdir -p /kaniko/.docker
|
2020-04-21 11:21:10 -04:00
|
|
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
|
|
|
|
2020-01-28 13:08:35 -05:00
|
|
|
.as-if-foss:
|
2019-10-04 11:06:38 -04:00
|
|
|
variables:
|
2019-10-16 14:08:01 -04:00
|
|
|
FOSS_ONLY: '1'
|
2020-04-08 11:09:29 -04:00
|
|
|
|
|
|
|
.use-docker-in-docker:
|
2021-02-03 13:09:25 -05:00
|
|
|
image: ${GITLAB_DEPENDENCY_PROXY}docker:${DOCKER_VERSION}
|
2020-04-08 11:09:29 -04:00
|
|
|
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
|