2019-08-26 20:41:55 +00:00
|
|
|
stages:
|
2019-10-24 18:07:05 +00:00
|
|
|
- sync
|
2019-08-26 20:41:55 +00:00
|
|
|
- prepare
|
2020-04-28 12:09:44 +00:00
|
|
|
- build-images
|
2020-02-20 12:08:51 +00:00
|
|
|
- fixtures
|
2019-08-26 20:41:55 +00:00
|
|
|
- test
|
2019-11-29 15:06:43 +00:00
|
|
|
- post-test
|
2019-08-28 21:07:54 +00:00
|
|
|
- review-prepare
|
2019-08-26 20:41:55 +00:00
|
|
|
- review
|
2020-08-24 18:10:19 +00:00
|
|
|
- dast
|
2019-08-26 20:41:55 +00:00
|
|
|
- qa
|
2019-11-29 15:06:43 +00:00
|
|
|
- post-qa
|
2019-08-26 20:41:55 +00:00
|
|
|
- pages
|
2020-08-07 21:10:07 +00:00
|
|
|
- notify
|
2019-08-26 20:41:55 +00:00
|
|
|
|
2020-04-08 15:09:29 +00:00
|
|
|
# always use `gitlab-org` runners, however
|
|
|
|
# in cases where jobs require Docker-in-Docker, the job
|
|
|
|
# definition must be extended with `.use-docker-in-docker`
|
2020-03-16 12:09:12 +00:00
|
|
|
default:
|
2021-09-17 09:09:24 +00:00
|
|
|
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.patched-golang-1.16-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36"
|
2020-03-16 12:09:12 +00:00
|
|
|
tags:
|
|
|
|
- gitlab-org
|
2020-03-27 09:08:28 +00:00
|
|
|
# All jobs are interruptible by default
|
|
|
|
interruptible: true
|
2020-07-16 15:09:38 +00:00
|
|
|
# Default job timeout set to 90m https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10520
|
|
|
|
timeout: 90m
|
2020-03-16 12:09:12 +00:00
|
|
|
|
2020-03-09 12:07:45 +00:00
|
|
|
workflow:
|
|
|
|
rules:
|
|
|
|
# If `$FORCE_GITLAB_CI` is set, create a pipeline.
|
|
|
|
- if: '$FORCE_GITLAB_CI'
|
2020-04-23 18:09:46 +00:00
|
|
|
# As part of the process of creating RCs automatically, we update stable
|
|
|
|
# branches with the changes of the most recent production deployment. The
|
|
|
|
# merge requests used for this merge a branch release-tools/X into a stable
|
|
|
|
# branch. For these merge requests we don't want to run any pipelines, as
|
|
|
|
# they serve no purpose and will run anyway when the changes are merged.
|
2020-04-30 18:09:38 +00:00
|
|
|
- if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^release-tools\/\d+\.\d+\.\d+-rc\d+$/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^[\d-]+-stable(-ee)?$/ && $CI_PROJECT_PATH == "gitlab-org/gitlab"'
|
2020-04-23 18:09:46 +00:00
|
|
|
when: never
|
2021-07-27 18:10:54 +00:00
|
|
|
# For merged result pipelines, set $QA_IMAGE, since $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA is only available for merged result pipelines.
|
|
|
|
- if: '$CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"'
|
|
|
|
variables:
|
|
|
|
QA_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}"
|
|
|
|
# Also run (detached) merge request pipelines.
|
2020-03-09 12:07:45 +00:00
|
|
|
- if: '$CI_MERGE_REQUEST_IID'
|
2021-07-27 18:10:54 +00:00
|
|
|
# For the 2-hourly scheduled pipelines, we set specific variables.
|
2021-07-22 06:08:43 +00:00
|
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "2-hourly"'
|
|
|
|
variables:
|
|
|
|
CRYSTALBALL: "true"
|
2021-03-30 15:11:08 +00:00
|
|
|
# For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
|
2020-04-21 15:21:10 +00:00
|
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
2020-03-09 12:07:45 +00:00
|
|
|
# For tags, create a pipeline.
|
|
|
|
- if: '$CI_COMMIT_TAG'
|
|
|
|
# If `$GITLAB_INTERNAL` isn't set, don't create a pipeline.
|
|
|
|
- if: '$GITLAB_INTERNAL == null'
|
|
|
|
when: never
|
|
|
|
# For stable, auto-deploy, and security branches, create a pipeline.
|
|
|
|
- if: '$CI_COMMIT_BRANCH =~ /^[\d-]+-stable(-ee)?$/'
|
|
|
|
- if: '$CI_COMMIT_BRANCH =~ /^\d+-\d+-auto-deploy-\d+$/'
|
|
|
|
- if: '$CI_COMMIT_BRANCH =~ /^security\//'
|
|
|
|
|
2016-01-22 13:45:34 +00:00
|
|
|
variables:
|
2016-05-22 01:41:17 +00:00
|
|
|
RAILS_ENV: "test"
|
2017-04-04 17:47:12 +00:00
|
|
|
NODE_ENV: "test"
|
2021-05-14 18:10:34 +00:00
|
|
|
BUNDLE_WITHOUT: "production:development"
|
|
|
|
BUNDLE_INSTALL_FLAGS: "--jobs=$(nproc) --retry=3 --quiet"
|
2021-04-08 12:09:18 +00:00
|
|
|
# we override the max_old_space_size to prevent OOM errors
|
|
|
|
NODE_OPTIONS: --max_old_space_size=3584
|
2019-12-11 21:08:17 +00:00
|
|
|
GIT_DEPTH: "20"
|
2017-04-26 15:57:44 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2016-12-15 11:40:33 +00:00
|
|
|
GET_SOURCES_ATTEMPTS: "3"
|
2021-05-17 12:10:23 +00:00
|
|
|
|
2019-09-27 15:06:16 +00:00
|
|
|
KNAPSACK_RSPEC_SUITE_REPORT_PATH: knapsack/report-master.json
|
2017-10-04 11:24:51 +00:00
|
|
|
FLAKY_RSPEC_SUITE_REPORT_PATH: rspec_flaky/report-suite.json
|
2020-10-28 15:08:49 +00:00
|
|
|
RSPEC_TESTS_MAPPING_PATH: crystalball/mapping.json
|
|
|
|
RSPEC_PACKED_TESTS_MAPPING_PATH: crystalball/packed-mapping.json
|
2021-05-17 12:10:23 +00:00
|
|
|
|
2019-08-27 16:48:36 +00:00
|
|
|
ES_JAVA_OPTS: "-Xms256m -Xmx256m"
|
2019-12-13 21:07:41 +00:00
|
|
|
ELASTIC_URL: "http://elastic:changeme@elasticsearch:9200"
|
2021-01-05 12:10:36 +00:00
|
|
|
DOCKER_VERSION: "20.10.1"
|
2020-11-09 06:09:23 +00:00
|
|
|
CACHE_CLASSES: "true"
|
2021-05-11 03:10:35 +00:00
|
|
|
CHECK_PRECOMPILED_ASSETS: "true"
|
2021-05-03 18:10:17 +00:00
|
|
|
FF_USE_FASTZIP: "true"
|
2016-01-22 13:45:34 +00:00
|
|
|
|
2021-05-17 12:10:23 +00:00
|
|
|
DOCS_REVIEW_APPS_DOMAIN: "178.62.207.141.nip.io"
|
|
|
|
DOCS_GITLAB_REPO_SUFFIX: "ee"
|
|
|
|
|
|
|
|
REVIEW_APPS_DOMAIN: "gitlab-review.app"
|
|
|
|
REVIEW_APPS_GCP_PROJECT: "gitlab-review-apps"
|
|
|
|
REVIEW_APPS_GCP_REGION: "us-central1"
|
|
|
|
|
|
|
|
BUILD_ASSETS_IMAGE: "true" # Set it to "false" to disable assets image building, used in `build-assets-image`
|
|
|
|
SIMPLECOV: "true"
|
|
|
|
|
2021-07-27 18:10:54 +00:00
|
|
|
# For the default QA image, we use $CI_COMMIT_SHA as tag since it's always available and we override it for specific workflow.rules (see above)
|
|
|
|
QA_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_SHA}"
|
|
|
|
|
2020-08-17 18:10:01 +00:00
|
|
|
# Preparing custom clone path to reduce space used by all random forks
|
|
|
|
# on GitLab.com's Shared Runners. Our main forks - especially the security
|
|
|
|
# ones - will have this variable overwritten in the project settings, so that
|
|
|
|
# a security-related code or code using our protected variables will be never
|
|
|
|
# stored on the same path as the community forks.
|
|
|
|
# Part of the solution for the `no space left on device` problem described at
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/issues/197876.
|
|
|
|
#
|
|
|
|
# For this purpose the https://gitlab.com/gitlab-org-forks group was created
|
|
|
|
# to host a placeholder for the `/builds/gitlab-org-forks` path and ensure
|
|
|
|
# that no legitimate project will ever use it and - by mistake - execute its
|
|
|
|
# job on a shared working directory. It also requires proper configuration of
|
|
|
|
# the Runner that executes the job (which was prepared for our shared runners
|
|
|
|
# by https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/3977).
|
|
|
|
#
|
|
|
|
# Because of all of that PLEASE DO NOT CHANGE THE PATH.
|
|
|
|
#
|
|
|
|
# For more details and reasoning that brought this change please check
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24887
|
|
|
|
GIT_CLONE_PATH: "/builds/gitlab-org-forks/${CI_PROJECT_NAME}"
|
|
|
|
|
2019-04-12 08:56:38 +00:00
|
|
|
include:
|
2021-05-10 15:10:24 +00:00
|
|
|
- local: .gitlab/ci/*.gitlab-ci.yml
|
2021-06-02 12:10:05 +00:00
|
|
|
- remote: 'https://gitlab.com/gitlab-org/frontend/untamper-my-lockfile/-/raw/main/.gitlab-ci-template.yml'
|