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:
|
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
|
|
|
|
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.
|
|
|
|
|
2021-06-11 11:09:58 -04:00
|
|
|
.gitaly-binaries-cache: &gitaly-binaries-cache
|
|
|
|
key:
|
|
|
|
files:
|
|
|
|
- GITALY_SERVER_VERSION
|
|
|
|
prefix: "gitaly-binaries"
|
|
|
|
paths:
|
|
|
|
- tmp/tests/gitaly/_build/bin/
|
|
|
|
- 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
|
|
|
|
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
|
2021-07-06 23:08:47 -04:00
|
|
|
key: "assets-${NODE_ENV}-v2"
|
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
|
|
|
|
key: "storybook-node-modules-${NODE_ENV}-v1"
|
|
|
|
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
|
|
|
|
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`.
|
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
|
|
|
|
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-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-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
|
|
|
|
|
|
|
|
.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-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:
|
|
|
|
- *storybook-node-modules-cache
|
|
|
|
|
|
|
|
.storybook-yarn-cache-push:
|
|
|
|
cache:
|
|
|
|
- *storybook-node-modules-cache-push
|
|
|
|
|
2021-06-15 08:10:11 -04:00
|
|
|
.use-pg11:
|
|
|
|
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.16-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36"
|
|
|
|
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:
|
2021-06-08 14:10:23 -04:00
|
|
|
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.16-git-2.31-lfs-2.9-chrome-89-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"]
|
2021-01-28 04:09:07 -05:00
|
|
|
- name: redis:5.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:
|
|
|
|
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.16-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-13-graphicsmagick-1.3.36"
|
|
|
|
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:
|
|
|
|
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.16-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36"
|
|
|
|
services:
|
|
|
|
- name: postgres:11.6
|
|
|
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
|
|
|
- name: redis:5.0-alpine
|
|
|
|
- name: elasticsearch:7.11.1
|
|
|
|
command: ["elasticsearch", "-E", "discovery.type=single-node"]
|
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
|
|
|
2020-07-09 08:08:56 -04:00
|
|
|
.use-pg12-ee:
|
2021-06-08 14:10:23 -04:00
|
|
|
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.16-git-2.31-lfs-2.9-chrome-89-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"]
|
2021-07-08 05:09:33 -04:00
|
|
|
- name: redis:5.0-alpine
|
|
|
|
- name: elasticsearch:7.11.1
|
|
|
|
command: ["elasticsearch", "-E", "discovery.type=single-node"]
|
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
|
|
|
|
|
|
.use-pg13-ee:
|
|
|
|
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.16-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-13-graphicsmagick-1.3.36"
|
|
|
|
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
|
2021-03-10 04:09:29 -05:00
|
|
|
- name: elasticsearch:7.11.1
|
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-05-17 11:10:15 -04:00
|
|
|
name: registry.gitlab.com/gitlab-org/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
|