2019-08-26 16:41:55 -04:00
|
|
|
.default-tags:
|
|
|
|
tags:
|
|
|
|
- gitlab-org
|
|
|
|
|
|
|
|
.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:
|
|
|
|
- date
|
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
|
|
|
|
- date
|
2019-04-12 04:56:38 -04:00
|
|
|
|
|
|
|
# Jobs that only need to pull cache
|
2019-08-26 16:41:55 -04:00
|
|
|
.default-cache:
|
2019-04-12 04:56:38 -04:00
|
|
|
cache:
|
2020-02-12 10:09:37 -05:00
|
|
|
key: "debian-stretch-ruby-2.6.5-pg9.6-node-12.x"
|
2019-08-26 16:41:55 -04:00
|
|
|
paths:
|
2019-09-24 11:06:34 -04:00
|
|
|
- .go/pkg/mod
|
2019-08-26 16:41:55 -04:00
|
|
|
- vendor/ruby
|
|
|
|
- .yarn-cache/
|
|
|
|
- vendor/gitaly-ruby
|
2019-04-12 04:56:38 -04:00
|
|
|
policy: pull
|
|
|
|
|
2019-09-17 10:16:34 -04:00
|
|
|
.default-only:
|
|
|
|
only:
|
2019-07-01 11:04:19 -04:00
|
|
|
refs:
|
2019-09-17 10:16:34 -04:00
|
|
|
- master
|
|
|
|
- /^[\d-]+-stable(-ee)?$/
|
|
|
|
- /^\d+-\d+-auto-deploy-\d+$/
|
2019-09-19 14:06:18 -04:00
|
|
|
- /^security\//
|
2019-09-17 10:16:34 -04:00
|
|
|
- merge_requests
|
|
|
|
- tags
|
2019-07-01 11:04:19 -04:00
|
|
|
|
2019-10-31 02:06:31 -04:00
|
|
|
.only:variables-canonical-dot-com:
|
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ # Matches the gitlab-org group or its subgroups
|
|
|
|
|
|
|
|
.only:variables_refs-canonical-dot-com-schedules:
|
|
|
|
extends: .only:variables-canonical-dot-com
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- schedules
|
|
|
|
|
|
|
|
.except:refs-deploy:
|
|
|
|
except:
|
|
|
|
refs:
|
|
|
|
- /^\d+-\d+-auto-deploy-\d+$/
|
|
|
|
|
|
|
|
.except:refs-master-tags-stable-deploy:
|
|
|
|
except:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- tags
|
|
|
|
- /^[\d-]+-stable(-ee)?$/
|
|
|
|
- /^\d+-\d+-auto-deploy-\d+$/
|
|
|
|
|
|
|
|
.only:kubernetes:
|
|
|
|
only:
|
|
|
|
kubernetes: active
|
|
|
|
|
|
|
|
.only-review:
|
|
|
|
extends:
|
|
|
|
- .only:variables-canonical-dot-com
|
|
|
|
- .only:kubernetes
|
|
|
|
- .except:refs-master-tags-stable-deploy
|
|
|
|
|
|
|
|
.only-review-schedules:
|
|
|
|
extends:
|
|
|
|
- .only:variables_refs-canonical-dot-com-schedules
|
|
|
|
- .only:kubernetes
|
|
|
|
- .except:refs-deploy
|
|
|
|
|
2019-10-30 17:07:58 -04:00
|
|
|
.code-patterns: &code-patterns
|
|
|
|
- ".gitlab/ci/**/*"
|
|
|
|
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
|
|
|
|
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
|
|
|
|
- ".csscomb.json"
|
|
|
|
- "Dockerfile.assets"
|
|
|
|
- "*_VERSION"
|
|
|
|
- "Gemfile{,.lock}"
|
|
|
|
- "Rakefile"
|
|
|
|
- "{babel.config,jest.config}.js"
|
|
|
|
- "config.ru"
|
|
|
|
- "{package.json,yarn.lock}"
|
|
|
|
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
|
2019-11-25 10:06:45 -05:00
|
|
|
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
|
2019-10-30 17:07:58 -04:00
|
|
|
|
|
|
|
.backstage-patterns: &backstage-patterns
|
|
|
|
- "Dangerfile"
|
|
|
|
- "danger/**/*"
|
|
|
|
- "{,ee/}fixtures/**/*"
|
|
|
|
- "{,ee/}rubocop/**/*"
|
|
|
|
- "{,ee/}spec/**/*"
|
|
|
|
- "doc/README.md" # Some RSpec test rely on this file
|
|
|
|
|
|
|
|
.qa-patterns: &qa-patterns
|
|
|
|
- ".dockerignore"
|
|
|
|
- "qa/**/*"
|
|
|
|
|
|
|
|
.docs-patterns: &docs-patterns
|
|
|
|
- ".gitlab/route-map.yml"
|
|
|
|
- "doc/**/*"
|
|
|
|
- ".markdownlint.json"
|
|
|
|
|
|
|
|
.only:changes-code:
|
|
|
|
only:
|
|
|
|
changes: *code-patterns
|
|
|
|
|
|
|
|
.only:changes-qa:
|
|
|
|
only:
|
|
|
|
changes: *qa-patterns
|
|
|
|
|
|
|
|
.only:changes-docs:
|
|
|
|
only:
|
|
|
|
changes: *docs-patterns
|
|
|
|
|
|
|
|
.only:changes-code-backstage:
|
2019-09-17 10:16:34 -04:00
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- ".gitlab/ci/**/*"
|
|
|
|
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
|
|
|
|
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
|
|
|
|
- ".csscomb.json"
|
|
|
|
- "Dockerfile.assets"
|
|
|
|
- "*_VERSION"
|
|
|
|
- "Gemfile{,.lock}"
|
|
|
|
- "Rakefile"
|
|
|
|
- "{babel.config,jest.config}.js"
|
|
|
|
- "config.ru"
|
|
|
|
- "{package.json,yarn.lock}"
|
2019-10-30 17:07:58 -04:00
|
|
|
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
|
2019-11-25 10:06:45 -05:00
|
|
|
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
|
2019-10-30 17:07:58 -04:00
|
|
|
# Backstage changes
|
|
|
|
- "Dangerfile"
|
|
|
|
- "danger/**/*"
|
|
|
|
- "{,ee/}fixtures/**/*"
|
|
|
|
- "{,ee/}rubocop/**/*"
|
|
|
|
- "{,ee/}spec/**/*"
|
2019-09-17 10:16:34 -04:00
|
|
|
- "doc/README.md" # Some RSpec test rely on this file
|
2019-04-12 04:56:38 -04:00
|
|
|
|
2019-10-30 17:07:58 -04:00
|
|
|
.only:changes-code-qa:
|
2019-09-17 10:16:34 -04:00
|
|
|
only:
|
|
|
|
changes:
|
2019-10-30 17:07:58 -04:00
|
|
|
- ".gitlab/ci/**/*"
|
|
|
|
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
|
|
|
|
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
|
|
|
|
- ".csscomb.json"
|
|
|
|
- "Dockerfile.assets"
|
|
|
|
- "*_VERSION"
|
|
|
|
- "Gemfile{,.lock}"
|
|
|
|
- "Rakefile"
|
|
|
|
- "{babel.config,jest.config}.js"
|
|
|
|
- "config.ru"
|
|
|
|
- "{package.json,yarn.lock}"
|
|
|
|
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
|
2019-11-25 10:06:45 -05:00
|
|
|
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
|
2019-10-30 17:07:58 -04:00
|
|
|
# QA changes
|
2019-09-17 10:16:34 -04:00
|
|
|
- ".dockerignore"
|
|
|
|
- "qa/**/*"
|
2019-06-25 04:57:33 -04:00
|
|
|
|
2019-10-30 17:07:58 -04:00
|
|
|
.only:changes-code-backstage-qa:
|
2019-08-21 05:34:42 -04:00
|
|
|
only:
|
2019-09-17 10:16:34 -04:00
|
|
|
changes:
|
|
|
|
- ".gitlab/ci/**/*"
|
|
|
|
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
|
|
|
|
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
|
|
|
|
- ".csscomb.json"
|
|
|
|
- "Dockerfile.assets"
|
|
|
|
- "*_VERSION"
|
|
|
|
- "Gemfile{,.lock}"
|
|
|
|
- "Rakefile"
|
|
|
|
- "{babel.config,jest.config}.js"
|
|
|
|
- "config.ru"
|
|
|
|
- "{package.json,yarn.lock}"
|
2019-10-30 17:07:58 -04:00
|
|
|
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
|
2019-11-25 10:06:45 -05:00
|
|
|
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
|
2019-10-30 17:07:58 -04:00
|
|
|
# Backstage changes
|
|
|
|
- "Dangerfile"
|
|
|
|
- "danger/**/*"
|
|
|
|
- "{,ee/}fixtures/**/*"
|
|
|
|
- "{,ee/}rubocop/**/*"
|
|
|
|
- "{,ee/}spec/**/*"
|
2019-09-17 10:16:34 -04:00
|
|
|
- "doc/README.md" # Some RSpec test rely on this file
|
2019-10-30 17:07:58 -04:00
|
|
|
# QA changes
|
2019-09-17 10:16:34 -04:00
|
|
|
- ".dockerignore"
|
|
|
|
- "qa/**/*"
|
|
|
|
|
2019-09-27 11:06:16 -04:00
|
|
|
.use-pg9:
|
2019-08-26 16:41:55 -04:00
|
|
|
services:
|
2019-09-27 11:06:16 -04:00
|
|
|
- name: postgres:9.6
|
2019-08-26 16:41:55 -04:00
|
|
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
|
|
|
- name: redis:alpine
|
2020-02-14 16:09:08 -05:00
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
2019-08-26 16:41:55 -04:00
|
|
|
|
2019-09-27 11:06:16 -04:00
|
|
|
.use-pg10:
|
2020-02-06 04:09:06 -05:00
|
|
|
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
|
2019-08-26 16:41:55 -04:00
|
|
|
services:
|
|
|
|
- name: postgres:10.9
|
|
|
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
|
|
|
- name: redis:alpine
|
2020-02-14 16:09:08 -05:00
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
2019-09-17 10:16:34 -04:00
|
|
|
|
2019-09-27 11:06:16 -04:00
|
|
|
.use-pg9-ee:
|
|
|
|
services:
|
|
|
|
- name: postgres:9.6
|
|
|
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
|
|
|
- name: redis:alpine
|
2020-01-15 13:08:34 -05:00
|
|
|
- name: elasticsearch:6.4.2
|
2020-02-14 16:09:08 -05:00
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
2019-09-27 11:06:16 -04:00
|
|
|
|
|
|
|
.use-pg10-ee:
|
2020-02-06 04:09:06 -05:00
|
|
|
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
|
2019-09-27 11:06:16 -04:00
|
|
|
services:
|
|
|
|
- name: postgres:10.9
|
|
|
|
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
|
|
|
- name: redis:alpine
|
2020-01-15 13:08:34 -05:00
|
|
|
- name: elasticsearch:6.4.2
|
2020-02-14 16:09:08 -05:00
|
|
|
variables:
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
2019-09-27 11:06:16 -04:00
|
|
|
|
2019-09-17 10:16:34 -04:00
|
|
|
.only-ee:
|
|
|
|
only:
|
|
|
|
variables:
|
2019-09-20 23:06:07 -04:00
|
|
|
- $CI_PROJECT_NAME == "gitlab"
|
2019-09-24 11:06:34 -04:00
|
|
|
- $CI_PROJECT_NAME == "gitlab-ee" # Support former project name for forks/mirrors
|
2019-10-04 11:06:38 -04:00
|
|
|
|
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-01-28 13:08:35 -05:00
|
|
|
|
|
|
|
.only-ee-as-if-foss:
|
|
|
|
extends:
|
|
|
|
- .only-ee
|
|
|
|
- .as-if-foss
|