2019-08-26 16:41:55 -04:00
|
|
|
stages:
|
2019-10-24 14:07:05 -04:00
|
|
|
- sync
|
2019-08-26 16:41:55 -04:00
|
|
|
- prepare
|
2020-04-28 08:09:44 -04:00
|
|
|
- build-images
|
2020-02-20 07:08:51 -05:00
|
|
|
- fixtures
|
2021-11-01 05:13:14 -04:00
|
|
|
- lint
|
2019-08-26 16:41:55 -04:00
|
|
|
- test
|
2019-11-29 10:06:43 -05:00
|
|
|
- post-test
|
2019-08-26 16:41:55 -04:00
|
|
|
- review
|
|
|
|
- qa
|
2019-11-29 10:06:43 -05:00
|
|
|
- post-qa
|
2019-08-26 16:41:55 -04:00
|
|
|
- pages
|
2020-08-07 17:10:07 -04:00
|
|
|
- notify
|
2019-08-26 16:41:55 -04:00
|
|
|
|
2020-04-08 11:09:29 -04: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 08:09:12 -04:00
|
|
|
default:
|
2022-04-07 14:08:29 -04:00
|
|
|
image: $DEFAULT_CI_IMAGE
|
2020-03-16 08:09:12 -04:00
|
|
|
tags:
|
|
|
|
- gitlab-org
|
2020-03-27 05:08:28 -04:00
|
|
|
# All jobs are interruptible by default
|
|
|
|
interruptible: true
|
2020-07-16 11:09:38 -04:00
|
|
|
# Default job timeout set to 90m https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10520
|
|
|
|
timeout: 90m
|
2020-03-16 08:09:12 -04:00
|
|
|
|
2020-03-09 08:07:45 -04:00
|
|
|
workflow:
|
|
|
|
rules:
|
|
|
|
# If `$FORCE_GITLAB_CI` is set, create a pipeline.
|
|
|
|
- if: '$FORCE_GITLAB_CI'
|
2020-04-23 14:09:46 -04: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 14:09:38 -04: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 14:09:46 -04:00
|
|
|
when: never
|
2022-07-06 11:08:08 -04:00
|
|
|
# For merge requests running exclusively in Ruby 3.0
|
|
|
|
- if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train") && $CI_MERGE_REQUEST_LABELS =~ /pipeline:run-in-ruby3/'
|
2021-07-27 14:10:54 -04:00
|
|
|
variables:
|
2022-07-06 11:08:08 -04:00
|
|
|
RUBY_VERSION: "3.0"
|
|
|
|
# For merge requests running exclusively in Ruby 3.0
|
|
|
|
- if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-in-ruby3/'
|
|
|
|
variables:
|
|
|
|
RUBY_VERSION: "3.0"
|
|
|
|
# For (detached) merge request pipelines.
|
2020-03-09 08:07:45 -04:00
|
|
|
- if: '$CI_MERGE_REQUEST_IID'
|
2022-07-04 11:10:24 -04:00
|
|
|
# For the maintenance scheduled pipelines, we set specific variables.
|
|
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "maintenance"'
|
2021-07-22 02:08:43 -04:00
|
|
|
variables:
|
|
|
|
CRYSTALBALL: "true"
|
2022-10-13 17:10:36 -04:00
|
|
|
NOTIFY_PIPELINE_FAILURE_CHANNEL: "master-broken"
|
2022-10-04 14:08:15 -04:00
|
|
|
# Run pipelines for ruby3 branch
|
|
|
|
- if: '$CI_COMMIT_BRANCH == "ruby3"'
|
|
|
|
variables:
|
|
|
|
RUBY_VERSION: "3.0"
|
|
|
|
NOTIFY_PIPELINE_FAILURE_CHANNEL: "f_ruby3"
|
2022-10-10 08:10:24 -04:00
|
|
|
OMNIBUS_GITLAB_RUBY3_BUILD: "true"
|
2022-10-11 17:10:14 -04:00
|
|
|
OMNIBUS_GITLAB_CACHE_EDITION: "GITLAB_RUBY3"
|
2022-10-13 14:10:20 -04:00
|
|
|
# This work around https://gitlab.com/gitlab-org/gitlab/-/issues/332411 whichs prevents usage of dependency proxy
|
|
|
|
# when pipeline is triggered by a project access token.
|
|
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $GITLAB_USER_LOGIN =~ /project_\d+_bot\d*/'
|
|
|
|
variables:
|
|
|
|
GITLAB_DEPENDENCY_PROXY_ADDRESS: ""
|
2021-03-30 11:11:08 -04:00
|
|
|
# For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
|
2020-04-21 11:21:10 -04:00
|
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
2022-10-13 17:10:36 -04:00
|
|
|
variables:
|
|
|
|
NOTIFY_PIPELINE_FAILURE_CHANNEL: "master-broken"
|
2020-03-09 08:07:45 -04: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 08:45:34 -05:00
|
|
|
variables:
|
2022-04-07 14:08:29 -04:00
|
|
|
PG_VERSION: "12"
|
2022-09-27 08:10:16 -04:00
|
|
|
DEFAULT_CI_IMAGE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}.patched-golang-${GO_VERSION}-node-16.14-postgresql-${PG_VERSION}:rubygems-3.2-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-yarn-1.22-graphicsmagick-1.3.36"
|
2022-10-13 14:10:20 -04:00
|
|
|
# We set $GITLAB_DEPENDENCY_PROXY to another variable (since it's set at the group level and has higher precedence than .gitlab-ci.yml)
|
|
|
|
# so that we can override $GITLAB_DEPENDENCY_PROXY_ADDRESS in workflow rules.
|
|
|
|
GITLAB_DEPENDENCY_PROXY_ADDRESS: "${GITLAB_DEPENDENCY_PROXY}"
|
2016-05-21 21:41:17 -04:00
|
|
|
RAILS_ENV: "test"
|
2017-04-04 13:47:12 -04:00
|
|
|
NODE_ENV: "test"
|
2021-05-14 14:10:34 -04:00
|
|
|
BUNDLE_WITHOUT: "production:development"
|
2022-09-13 14:12:21 -04:00
|
|
|
BUNDLE_INSTALL_FLAGS: "--jobs=$(nproc) --retry=3"
|
2022-05-24 11:08:28 -04:00
|
|
|
BUNDLE_FROZEN: "true"
|
2021-04-08 08:09:18 -04:00
|
|
|
# we override the max_old_space_size to prevent OOM errors
|
|
|
|
NODE_OPTIONS: --max_old_space_size=3584
|
2019-12-11 16:08:17 -05:00
|
|
|
GIT_DEPTH: "20"
|
2022-02-28 19:16:24 -05:00
|
|
|
# 'GIT_STRATEGY: clone' optimizes the pack-objects cache hit ratio
|
|
|
|
GIT_STRATEGY: "clone"
|
2017-04-26 11:57:44 -04:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2016-12-15 06:40:33 -05:00
|
|
|
GET_SOURCES_ATTEMPTS: "3"
|
2022-02-15 01:17:51 -05:00
|
|
|
DEBIAN_VERSION: "bullseye"
|
2022-08-02 14:12:15 -04:00
|
|
|
CHROME_VERSION: "103"
|
2022-06-08 08:08:46 -04:00
|
|
|
DOCKER_VERSION: "20.10.14"
|
2022-06-15 11:09:20 -04:00
|
|
|
RUBY_VERSION: "2.7"
|
2022-09-27 08:10:16 -04:00
|
|
|
GO_VERSION: "1.18"
|
2021-05-17 08:10:23 -04:00
|
|
|
|
2022-02-24 16:15:17 -05:00
|
|
|
TMP_TEST_FOLDER: "${CI_PROJECT_DIR}/tmp/tests"
|
|
|
|
GITLAB_WORKHORSE_FOLDER: "gitlab-workhorse"
|
|
|
|
TMP_TEST_GITLAB_WORKHORSE_PATH: "${TMP_TEST_FOLDER}/${GITLAB_WORKHORSE_FOLDER}"
|
2019-09-27 11:06:16 -04:00
|
|
|
KNAPSACK_RSPEC_SUITE_REPORT_PATH: knapsack/report-master.json
|
2022-01-25 13:11:55 -05:00
|
|
|
FLAKY_RSPEC_SUITE_REPORT_PATH: rspec/flaky/report-suite.json
|
2020-10-28 11:08:49 -04:00
|
|
|
RSPEC_TESTS_MAPPING_PATH: crystalball/mapping.json
|
|
|
|
RSPEC_PACKED_TESTS_MAPPING_PATH: crystalball/packed-mapping.json
|
2022-01-25 13:11:55 -05:00
|
|
|
RSPEC_PROFILING_FOLDER_PATH: rspec/profiling
|
2021-11-24 19:10:49 -05:00
|
|
|
FRONTEND_FIXTURES_MAPPING_PATH: crystalball/frontend_fixtures_mapping.json
|
2022-08-31 14:10:17 -04:00
|
|
|
RSPEC_CHANGED_FILES_PATH: rspec/changed_files.txt
|
|
|
|
RSPEC_MATCHING_TESTS_PATH: rspec/matching_tests.txt
|
2022-10-06 11:09:39 -04:00
|
|
|
RSPEC_MATCHING_TESTS_FOSS_PATH: rspec/matching_tests-foss.txt
|
2022-01-25 13:11:55 -05:00
|
|
|
RSPEC_LAST_RUN_RESULTS_FILE: rspec/rspec_last_run_results.txt
|
2022-10-06 11:09:39 -04:00
|
|
|
RSPEC_FOSS_IMPACT_PIPELINE_YML: rspec-foss-impact-pipeline.yml
|
2022-01-25 13:11:55 -05:00
|
|
|
JUNIT_RESULT_FILE: rspec/junit_rspec.xml
|
|
|
|
JUNIT_RETRY_FILE: rspec/junit_rspec-retry.xml
|
2021-05-17 08:10:23 -04:00
|
|
|
|
2019-08-27 12:48:36 -04:00
|
|
|
ES_JAVA_OPTS: "-Xms256m -Xmx256m"
|
2019-12-13 16:07:41 -05:00
|
|
|
ELASTIC_URL: "http://elastic:changeme@elasticsearch:9200"
|
2020-11-09 01:09:23 -05:00
|
|
|
CACHE_CLASSES: "true"
|
2021-05-10 23:10:35 -04:00
|
|
|
CHECK_PRECOMPILED_ASSETS: "true"
|
2021-05-03 14:10:17 -04:00
|
|
|
FF_USE_FASTZIP: "true"
|
2022-01-05 19:15:57 -05:00
|
|
|
SKIP_FLAKY_TESTS_AUTOMATICALLY: "true"
|
2022-04-19 11:08:32 -04:00
|
|
|
RETRY_FAILED_TESTS_IN_NEW_PROCESS: "true"
|
2022-03-17 23:07:42 -04:00
|
|
|
# Run with decomposed databases by default
|
|
|
|
DECOMPOSED_DB: "true"
|
2016-01-22 08:45:34 -05:00
|
|
|
|
2022-10-20 17:09:04 -04:00
|
|
|
DOCS_REVIEW_APPS_DOMAIN: "docs.gitlab-review.app"
|
2021-05-17 08:10:23 -04:00
|
|
|
DOCS_GITLAB_REPO_SUFFIX: "ee"
|
|
|
|
|
2022-07-21 11:09:12 -04:00
|
|
|
REVIEW_APPS_IMAGE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/ruby-3.0:gcloud-383-kubectl-1.23-helm-3.5"
|
2021-05-17 08:10:23 -04:00
|
|
|
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-12-14 13:11:35 -05:00
|
|
|
REGISTRY_HOST: "registry.gitlab.com"
|
|
|
|
REGISTRY_GROUP: "gitlab-org"
|
|
|
|
|
2019-04-12 04:56:38 -04:00
|
|
|
include:
|
2021-05-10 11:10:24 -04:00
|
|
|
- local: .gitlab/ci/*.gitlab-ci.yml
|
2022-04-22 14:09:22 -04:00
|
|
|
- remote: 'https://gitlab.com/gitlab-org/frontend/untamper-my-lockfile/-/raw/main/templates/merge_request_pipelines.yml'
|