debian-mirror-gitlab/.gitlab-ci.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

207 lines
9.0 KiB
YAML
Raw Normal View History

2019-12-04 20:38:33 +05:30
stages:
2019-12-26 22:10:19 +05:30
- sync
2023-04-23 21:23:45 +05:30
- preflight
2019-12-04 20:38:33 +05:30
- prepare
2020-05-24 23:13:21 +05:30
- build-images
2020-04-08 14:13:33 +05:30
- fixtures
2021-12-11 22:18:48 +05:30
- lint
2019-12-04 20:38:33 +05:30
- test
2020-01-01 13:55:28 +05:30
- post-test
2019-12-04 20:38:33 +05:30
- review
- qa
2020-01-01 13:55:28 +05:30
- post-qa
2019-12-04 20:38:33 +05:30
- pages
2020-10-24 23:57:45 +05:30
- notify
2023-05-08 21:46:49 +05:30
- release-environments
2019-12-04 20:38:33 +05:30
2020-04-22 19:07:51 +05:30
# 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-04-08 14:13:33 +05:30
default:
2022-06-21 17:19:12 +05:30
image: $DEFAULT_CI_IMAGE
2020-04-08 14:13:33 +05:30
tags:
- gitlab-org
2020-04-22 19:07:51 +05:30
# All jobs are interruptible by default
interruptible: true
2020-07-28 23:09:34 +05:30
# Default job timeout set to 90m https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10520
timeout: 90m
2020-04-08 14:13:33 +05:30
2023-06-20 00:43:36 +05:30
.default-ruby-variables: &default-ruby-variables
2023-04-23 21:23:45 +05:30
RUBY_VERSION: "3.0"
OMNIBUS_GITLAB_RUBY3_BUILD: "true"
OMNIBUS_GITLAB_CACHE_EDITION: "GITLAB_RUBY3"
2023-06-20 00:43:36 +05:30
.backcompat-ruby-variables: &backcompat-ruby-variables
2023-04-23 21:23:45 +05:30
RUBY_VERSION: "2.7"
2023-05-08 21:46:49 +05:30
OMNIBUS_GITLAB_RUBY2_BUILD: "true"
OMNIBUS_GITLAB_CACHE_EDITION: "GITLAB_RUBY2"
2023-04-23 21:23:45 +05:30
2023-05-27 22:25:52 +05:30
.default-branch-pipeline-failure-variables: &default-branch-pipeline-failure-variables
CREATE_ISSUES_FOR_FAILING_TESTS: "true"
2023-04-23 21:23:45 +05:30
2020-04-08 14:13:33 +05:30
workflow:
2023-03-04 22:38:38 +05:30
name: '$PIPELINE_NAME'
2020-04-08 14:13:33 +05:30
rules:
# If `$FORCE_GITLAB_CI` is set, create a pipeline.
- if: '$FORCE_GITLAB_CI'
2023-03-17 16:20:25 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
PIPELINE_NAME: 'Ruby $RUBY_VERSION forced pipeline'
2020-05-24 23:13:21 +05:30
# 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.
- 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"'
when: never
2023-03-17 16:20:25 +05:30
# For merge requests running exclusively in Ruby 2.7
- if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-in-ruby2/'
2022-08-13 15:12:31 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *backcompat-ruby-variables
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_MERGE_REQUEST_EVENT_TYPE MR pipeline'
2023-05-27 22:25:52 +05:30
NO_SOURCEMAPS: 'true'
2023-04-23 21:23:45 +05:30
- if: '$CI_MERGE_REQUEST_LABELS =~ /Community contribution/'
variables:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
2023-04-23 21:23:45 +05:30
GITLAB_DEPENDENCY_PROXY_ADDRESS: ""
2023-06-20 00:43:36 +05:30
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_MERGE_REQUEST_EVENT_TYPE MR pipeline (community contribution)'
2023-05-27 22:25:52 +05:30
NO_SOURCEMAPS: 'true'
2022-08-13 15:12:31 +05:30
# For (detached) merge request pipelines.
2020-04-08 14:13:33 +05:30
- if: '$CI_MERGE_REQUEST_IID'
2023-03-04 22:38:38 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_MERGE_REQUEST_EVENT_TYPE MR pipeline'
2023-05-27 22:25:52 +05:30
NO_SOURCEMAPS: 'true'
2023-01-13 00:05:48 +05:30
# For the scheduled pipelines, we set specific variables.
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"'
2021-10-27 15:23:28 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
2023-05-27 22:25:52 +05:30
<<: *default-branch-pipeline-failure-variables
2021-10-27 15:23:28 +05:30
CRYSTALBALL: "true"
2023-06-20 00:43:36 +05:30
PIPELINE_NAME: 'Scheduled Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
2023-03-17 16:20:25 +05:30
# Run pipelines for ruby2 branch
- if: '$CI_COMMIT_BRANCH == "ruby2" && $CI_PIPELINE_SOURCE == "schedule"'
2022-11-25 23:54:43 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *backcompat-ruby-variables
PIPELINE_NAME: 'Scheduled Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
2022-11-25 23:54:43 +05:30
# 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:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
2023-05-27 22:25:52 +05:30
<<: *default-branch-pipeline-failure-variables
2022-11-25 23:54:43 +05:30
GITLAB_DEPENDENCY_PROXY_ADDRESS: ""
2023-06-20 00:43:36 +05:30
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline (triggered by a project token)'
2021-04-29 21:17:54 +05:30
# For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
2020-05-24 23:13:21 +05:30
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
2022-11-25 23:54:43 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
2023-05-27 22:25:52 +05:30
<<: *default-branch-pipeline-failure-variables
2023-06-20 00:43:36 +05:30
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
2020-04-08 14:13:33 +05:30
# For tags, create a pipeline.
- if: '$CI_COMMIT_TAG'
2023-03-17 16:20:25 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_TAG tag pipeline'
2020-04-08 14:13:33 +05:30
# 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)?$/'
2023-02-26 17:17:37 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
2020-04-08 14:13:33 +05:30
- if: '$CI_COMMIT_BRANCH =~ /^\d+-\d+-auto-deploy-\d+$/'
2023-03-17 16:20:25 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
2020-04-08 14:13:33 +05:30
- if: '$CI_COMMIT_BRANCH =~ /^security\//'
2023-03-17 16:20:25 +05:30
variables:
2023-06-20 00:43:36 +05:30
<<: *default-ruby-variables
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
2020-04-08 14:13:33 +05:30
2019-05-05 18:10:48 +05:30
variables:
2023-06-20 00:43:36 +05:30
PG_VERSION: "13"
2023-05-27 22:25:52 +05:30
DEFAULT_CI_IMAGE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}.patched-golang-${GO_VERSION}-rust-${RUST_VERSION}-node-16.14-postgresql-${PG_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-yarn-1.22-graphicsmagick-1.3.36"
2022-11-25 23:54:43 +05:30
# 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}"
2019-05-05 18:10:48 +05:30
RAILS_ENV: "test"
NODE_ENV: "test"
2021-06-08 01:23:25 +05:30
BUNDLE_WITHOUT: "production:development"
2022-10-11 01:57:18 +05:30
BUNDLE_INSTALL_FLAGS: "--jobs=$(nproc) --retry=3"
2022-07-23 23:45:48 +05:30
BUNDLE_FROZEN: "true"
2021-04-29 21:17:54 +05:30
# we override the max_old_space_size to prevent OOM errors
2023-05-27 22:25:52 +05:30
NODE_OPTIONS: --max_old_space_size=4096
2020-01-01 13:55:28 +05:30
GIT_DEPTH: "20"
2022-05-07 20:08:51 +05:30
# 'GIT_STRATEGY: clone' optimizes the pack-objects cache hit ratio
GIT_STRATEGY: "clone"
2019-05-05 18:10:48 +05:30
GIT_SUBMODULE_STRATEGY: "none"
GET_SOURCES_ATTEMPTS: "3"
2022-04-04 11:22:00 +05:30
DEBIAN_VERSION: "bullseye"
2023-06-20 00:43:36 +05:30
UBI_VERSION: "8.6"
2023-04-23 21:23:45 +05:30
CHROME_VERSION: "109"
2023-05-27 22:25:52 +05:30
DOCKER_VERSION: "23.0.1"
2022-07-23 23:45:48 +05:30
RUBY_VERSION: "2.7"
2023-05-27 22:25:52 +05:30
RUBYGEMS_VERSION: "3.4"
2023-06-20 00:43:36 +05:30
GO_VERSION: "1.19"
2023-04-23 21:23:45 +05:30
RUST_VERSION: "1.65"
2021-06-08 01:23:25 +05:30
2022-04-04 11:22:00 +05:30
FLAKY_RSPEC_SUITE_REPORT_PATH: rspec/flaky/report-suite.json
2022-01-26 12:08:38 +05:30
FRONTEND_FIXTURES_MAPPING_PATH: crystalball/frontend_fixtures_mapping.json
2023-03-17 16:20:25 +05:30
GITLAB_WORKHORSE_FOLDER: "gitlab-workhorse"
2022-04-04 11:22:00 +05:30
JUNIT_RESULT_FILE: rspec/junit_rspec.xml
JUNIT_RETRY_FILE: rspec/junit_rspec-retry.xml
2023-03-17 16:20:25 +05:30
KNAPSACK_RSPEC_SUITE_REPORT_PATH: knapsack/report-master.json
RSPEC_CHANGED_FILES_PATH: rspec/changed_files.txt
2023-05-27 22:25:52 +05:30
RSPEC_FOSS_IMPACT_PIPELINE_TEMPLATE_YML: .gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb
2023-06-20 00:43:36 +05:30
RSPEC_PREDICTIVE_PIPELINE_TEMPLATE_YML: .gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb
2023-03-17 16:20:25 +05:30
RSPEC_LAST_RUN_RESULTS_FILE: rspec/rspec_last_run_results.txt
RSPEC_MATCHING_JS_FILES_PATH: rspec/js_matching_files.txt
2023-06-20 00:43:36 +05:30
RSPEC_VIEWS_INCLUDING_PARTIALS_PATH: rspec/views_including_partials.txt
2023-03-17 16:20:25 +05:30
RSPEC_MATCHING_TESTS_PATH: rspec/matching_tests.txt
2023-04-23 21:23:45 +05:30
RSPEC_MATCHING_TESTS_FOSS_PATH: rspec/matching_tests-foss.txt
RSPEC_MATCHING_TESTS_EE_PATH: rspec/matching_tests-ee.txt
2023-03-17 16:20:25 +05:30
RSPEC_PACKED_TESTS_MAPPING_PATH: crystalball/packed-mapping.json
RSPEC_PROFILING_FOLDER_PATH: rspec/profiling
RSPEC_TESTS_MAPPING_PATH: crystalball/mapping.json
2023-07-09 08:55:56 +05:30
RSPEC_FAST_QUARANTINE_LOCAL_PATH: rspec/fast_quarantine-gitlab.txt
2023-03-17 16:20:25 +05:30
TMP_TEST_FOLDER: "${CI_PROJECT_DIR}/tmp/tests"
TMP_TEST_GITLAB_WORKHORSE_PATH: "${TMP_TEST_FOLDER}/${GITLAB_WORKHORSE_FOLDER}"
2021-06-08 01:23:25 +05:30
2019-12-04 20:38:33 +05:30
ES_JAVA_OPTS: "-Xms256m -Xmx256m"
2020-01-01 13:55:28 +05:30
ELASTIC_URL: "http://elastic:changeme@elasticsearch:9200"
2023-05-08 21:46:49 +05:30
BUNDLER_CHECKSUM_VERIFICATION_OPT_IN: "1"
2021-01-29 00:20:46 +05:30
CACHE_CLASSES: "true"
2021-06-08 01:23:25 +05:30
CHECK_PRECOMPILED_ASSETS: "true"
FF_USE_FASTZIP: "true"
2022-06-21 17:19:12 +05:30
RETRY_FAILED_TESTS_IN_NEW_PROCESS: "true"
2022-05-07 20:08:51 +05:30
# Run with decomposed databases by default
DECOMPOSED_DB: "true"
2021-06-08 01:23:25 +05:30
2023-01-13 00:05:48 +05:30
DOCS_REVIEW_APPS_DOMAIN: "docs.gitlab-review.app"
2021-06-08 01:23:25 +05:30
DOCS_GITLAB_REPO_SUFFIX: "ee"
2022-08-27 11:52:29 +05:30
REVIEW_APPS_IMAGE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/ruby-3.0:gcloud-383-kubectl-1.23-helm-3.5"
2021-06-08 01:23:25 +05:30
REVIEW_APPS_DOMAIN: "gitlab-review.app"
REVIEW_APPS_GCP_PROJECT: "gitlab-review-apps"
REVIEW_APPS_GCP_REGION: "us-central1"
2023-05-08 21:46:49 +05:30
CACHE_ASSETS_AS_PACKAGE: "true"
2021-06-08 01:23:25 +05:30
BUILD_ASSETS_IMAGE: "true" # Set it to "false" to disable assets image building, used in `build-assets-image`
SIMPLECOV: "true"
2019-05-05 18:10:48 +05:30
2022-01-26 12:08:38 +05:30
REGISTRY_HOST: "registry.gitlab.com"
REGISTRY_GROUP: "gitlab-org"
2023-03-04 22:38:38 +05:30
# Disable useless network connections when installing some NPM packages.
# See https://gitlab.com/gitlab-com/gl-security/engineering-and-research/inventory/-/issues/827#note_1203181407
DISABLE_OPENCOLLECTIVE: "true"
2023-04-23 21:23:45 +05:30
# This is set at the gitlab-org level, but we set it here for forks
DANGER_DO_NOT_POST_INVALID_DANGERFILE_ERROR: "1"
2019-07-31 22:56:46 +05:30
include:
2021-06-08 01:23:25 +05:30
- local: .gitlab/ci/*.gitlab-ci.yml
2022-07-16 23:28:13 +05:30
- remote: 'https://gitlab.com/gitlab-org/frontend/untamper-my-lockfile/-/raw/main/templates/merge_request_pipelines.yml'