Commit 475396fc authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@13-2-stable-ee

parent 0a9256625ad5
...@@ -17,6 +17,7 @@ eslint-report.html ...@@ -17,6 +17,7 @@ eslint-report.html
.rbx/ .rbx/
/.ruby-gemset /.ruby-gemset
/.ruby-version /.ruby-version
/.tool-versions
/.rvmrc /.rvmrc
.sass-cache/ .sass-cache/
/.secret /.secret
......
...@@ -20,6 +20,8 @@ default: ...@@ -20,6 +20,8 @@ default:
- gitlab-org - gitlab-org
# All jobs are interruptible by default # All jobs are interruptible by default
interruptible: true interruptible: true
# Default job timeout set to 90m https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10520
timeout: 90m
workflow: workflow:
rules: rules:
...@@ -61,6 +63,7 @@ variables: ...@@ -61,6 +63,7 @@ variables:
DOCKER_VERSION: "19.03.0" DOCKER_VERSION: "19.03.0"
include: include:
- local: .gitlab/ci/build-images.gitlab-ci.yml
- local: .gitlab/ci/cache-repo.gitlab-ci.yml - local: .gitlab/ci/cache-repo.gitlab-ci.yml
- local: .gitlab/ci/cng.gitlab-ci.yml - local: .gitlab/ci/cng.gitlab-ci.yml
- local: .gitlab/ci/docs.gitlab-ci.yml - local: .gitlab/ci/docs.gitlab-ci.yml
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
/doc/development/ @marcia @mjang1 /doc/development/ @marcia @mjang1
/doc/development/documentation/ @mikelewis /doc/development/documentation/ @mikelewis
/doc/ci @marcel.amirault @sselhorn /doc/ci @marcel.amirault @sselhorn
/doc/operations @aqualls @eread
/doc/user/clusters @aqualls /doc/user/clusters @aqualls
/doc/user/infrastructure @aqualls /doc/user/infrastructure @aqualls
/doc/user/project/clusters @aqualls /doc/user/project/clusters @aqualls
...@@ -43,17 +44,12 @@ ...@@ -43,17 +44,12 @@
# Feature specific owners # Feature specific owners
/ee/lib/ee/gitlab/auth/ldap/ @dblessing @mkozono /ee/lib/ee/gitlab/auth/ldap/ @dblessing @mkozono
/lib/gitlab/auth/ldap/ @dblessing @mkozono /lib/gitlab/auth/ldap/ @dblessing @mkozono
/lib/gitlab/ci/templates/ @nolith @zj /lib/gitlab/ci/templates/ @nolith @dosuken123
/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml @DylanGriffith @mayra-cabrera @tkuah /lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml @DylanGriffith @mayra-cabrera @tkuah
/lib/gitlab/ci/templates/Security/ @plafoucriere @gonzoyumo @twoodham @sethgitlab /lib/gitlab/ci/templates/Security/ @plafoucriere @gonzoyumo @twoodham @sethgitlab
/ee/app/models/project_alias.rb @patrickbajao /ee/app/models/project_alias.rb @patrickbajao
/ee/lib/api/project_aliases.rb @patrickbajao /ee/lib/api/project_aliases.rb @patrickbajao
# Code Owners
#
/ee/lib/gitlab/code_owners/ @reprazent @kerrizor @garyh
/doc/user/project/code_owners.md @reprazent @kerrizor @garyh
# Quality owned files # Quality owned files
/qa/ @gl-quality /qa/ @gl-quality
...@@ -77,3 +73,9 @@ Dangerfile @gl-quality/eng-prod ...@@ -77,3 +73,9 @@ Dangerfile @gl-quality/eng-prod
/lib/gitlab/usage_data.rb @gitlab-org/growth/telemetry /lib/gitlab/usage_data.rb @gitlab-org/growth/telemetry
/lib/gitlab/cycle_analytics/usage_data.rb @gitlab-org/growth/telemetry /lib/gitlab/cycle_analytics/usage_data.rb @gitlab-org/growth/telemetry
/lib/gitlab/usage_data_counters/ @gitlab-org/growth/telemetry /lib/gitlab/usage_data_counters/ @gitlab-org/growth/telemetry
[Code Owners]
/ee/lib/gitlab/code_owners.rb @reprazent @kerrizor @garyh
/ee/lib/gitlab/code_owners/ @reprazent @kerrizor @garyh
/ee/spec/lib/gitlab/code_owners/ @reprazent @kerrizor @garyh
/doc/user/project/code_owners.md @reprazent @kerrizor @garyh
# This image is used by the `review-qa-*` jobs. Not currently used by the `omnibus-gitlab` pipelines which rebuild this
# image, e.g. https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/-/jobs/587107399, which we could probably avoid.
# See https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5429.
build-qa-image:
extends:
- .use-kaniko
- .build-images:rules:build-qa-image
stage: build-images
needs: []
script:
- export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_REF_SLUG}"
- /kaniko/executor --context=${CI_PROJECT_DIR} --dockerfile=${CI_PROJECT_DIR}/qa/Dockerfile --destination=${QA_IMAGE} --cache=true
retry: 2
# This image is used by:
# - The `CNG` pipelines (via the `review-build-cng` job): https://gitlab.com/gitlab-org/build/CNG/-/blob/cfc67136d711e1c8c409bf8e57427a644393da2f/.gitlab-ci.yml#L335
# - The `omnibus-gitlab` pipelines (via the `package-and-qa` job): https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/dfd1ad475868fc84e91ab7b5706aa03e46dc3a86/.gitlab-ci.yml#L130
build-assets-image:
extends:
- .use-kaniko
- .build-images:rules:build-assets-image
stage: build-images
needs: ["compile-production-assets"]
variables:
GIT_DEPTH: "1"
script:
# TODO: Change the image tag to be the MD5 of assets files and skip image building if the image exists
# We'll also need to pass GITLAB_ASSETS_TAG to the trigerred omnibus-gitlab pipeline similarly to how we do it for trigerred CNG pipelines
# https://gitlab.com/gitlab-org/gitlab/issues/208389
- run_timed_command "scripts/build_assets_image"
retry: 2
...@@ -59,6 +59,15 @@ docs lint: ...@@ -59,6 +59,15 @@ docs lint:
# Check the internal anchor links # Check the internal anchor links
- bundle exec nanoc check internal_anchors - bundle exec nanoc check internal_anchors
ui-docs-links lint:
extends:
- .docs:rules:docs-lint
- .static-analysis-base
stage: test
needs: []
script:
- bundle exec haml-lint -i DocumentationLinks
graphql-reference-verify: graphql-reference-verify:
extends: extends:
- .default-retry - .default-retry
......
...@@ -2,16 +2,18 @@ ...@@ -2,16 +2,18 @@
extends: extends:
- .default-retry - .default-retry
- .default-before_script - .default-before_script
- .assets-compile-cache
variables: variables:
SETUP_DB: "false" SETUP_DB: "false"
# we override the max_old_space_size to prevent OOM errors # we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS: --max_old_space_size=3584 NODE_OPTIONS: --max_old_space_size=3584
WEBPACK_VENDOR_DLL: "true"
.compile-assets-base: .compile-assets-base:
extends: .frontend-base extends:
- .frontend-base
- .assets-compile-cache
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-git-2.27-lfs-2.9-node-12.x-yarn-1.21-graphicsmagick-1.3.34 image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-git-2.27-lfs-2.9-node-12.x-yarn-1.21-graphicsmagick-1.3.34
variables:
WEBPACK_VENDOR_DLL: "true"
stage: prepare stage: prepare
script: script:
- node --version - node --version
...@@ -90,21 +92,6 @@ update-yarn-cache: ...@@ -90,21 +92,6 @@ update-yarn-cache:
cache: cache:
policy: push policy: push
build-assets-image:
extends:
- .use-kaniko
- .frontend:rules:compile-production-assets
stage: build-images
needs: ["compile-production-assets"]
variables:
GIT_DEPTH: "1"
script:
# TODO: Change the image tag to be the MD5 of assets files and skip image building if the image exists
# We'll also need to pass GITLAB_ASSETS_TAG to the trigerred omnibus-gitlab pipeline similarly to how we do it for trigerred CNG pipelines
# https://gitlab.com/gitlab-org/gitlab/issues/208389
- run_timed_command "scripts/build_assets_image"
retry: 2
.frontend-fixtures-base: .frontend-fixtures-base:
extends: extends:
- .frontend-base - .frontend-base
...@@ -114,6 +101,7 @@ build-assets-image: ...@@ -114,6 +101,7 @@ build-assets-image:
needs: ["setup-test-env", "compile-test-assets"] needs: ["setup-test-env", "compile-test-assets"]
variables: variables:
SETUP_DB: "true" SETUP_DB: "true"
WEBPACK_VENDOR_DLL: "true"
script: script:
- run_timed_command "scripts/gitaly-test-build" - run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn" - run_timed_command "scripts/gitaly-test-spawn"
...@@ -138,22 +126,25 @@ frontend-fixtures-as-if-foss: ...@@ -138,22 +126,25 @@ frontend-fixtures-as-if-foss:
.frontend-test-base: .frontend-test-base:
extends: extends:
- .default-retry - .frontend-base
- .yarn-cache - .yarn-cache
variables: variables:
USE_BUNDLE_INSTALL: "false" USE_BUNDLE_INSTALL: "false"
SETUP_DB: "false"
stage: test stage: test
before_script:
- source scripts/utils.sh eslint-as-if-foss:
extends:
- .frontend-test-base
- .frontend:rules:eslint-as-if-foss
- .as-if-foss
needs: []
script:
- run_timed_command "retry yarn install --frozen-lockfile"
- yarn run eslint
.karma-base: .karma-base:
extends: .frontend-test-base extends: .frontend-test-base
variables:
# we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS: --max_old_space_size=3584
script: script:
- source scripts/utils.sh
- export BABEL_ENV=coverage CHROME_LOG_FILE=chrome_debug.log - export BABEL_ENV=coverage CHROME_LOG_FILE=chrome_debug.log
- run_timed_command "retry yarn install --frozen-lockfile" - run_timed_command "retry yarn install --frozen-lockfile"
- run_timed_command "yarn karma" - run_timed_command "yarn karma"
...@@ -174,6 +165,7 @@ karma: ...@@ -174,6 +165,7 @@ karma:
- tmp/tests/frontend/ - tmp/tests/frontend/
reports: reports:
junit: junit_karma.xml junit: junit_karma.xml
cobertura: coverage-javascript/cobertura-coverage.xml
karma-as-if-foss: karma-as-if-foss:
extends: extends:
...@@ -185,7 +177,6 @@ karma-as-if-foss: ...@@ -185,7 +177,6 @@ karma-as-if-foss:
.jest-base: .jest-base:
extends: .frontend-test-base extends: .frontend-test-base
script: script:
- source scripts/utils.sh
- run_timed_command "retry yarn install --frozen-lockfile" - run_timed_command "retry yarn install --frozen-lockfile"
- run_timed_command "yarn jest --ci --coverage --testSequencer ./scripts/frontend/parallel_ci_sequencer.js" - run_timed_command "yarn jest --ci --coverage --testSequencer ./scripts/frontend/parallel_ci_sequencer.js"
...@@ -211,7 +202,6 @@ jest-integration: ...@@ -211,7 +202,6 @@ jest-integration:
- .frontend-test-base - .frontend-test-base
- .frontend:rules:default-frontend-jobs - .frontend:rules:default-frontend-jobs
script: script:
- source scripts/utils.sh
- run_timed_command "retry yarn install --frozen-lockfile" - run_timed_command "retry yarn install --frozen-lockfile"
- run_timed_command "yarn jest:integration --ci" - run_timed_command "yarn jest:integration --ci"
needs: ["frontend-fixtures"] needs: ["frontend-fixtures"]
...@@ -236,11 +226,14 @@ coverage-frontend: ...@@ -236,11 +226,14 @@ coverage-frontend:
- run_timed_command "retry yarn install --frozen-lockfile" - run_timed_command "retry yarn install --frozen-lockfile"
script: script:
- run_timed_command "yarn node scripts/frontend/merge_coverage_frontend.js" - run_timed_command "yarn node scripts/frontend/merge_coverage_frontend.js"
coverage: '/^Statements\s*:\s*?(\d+(?:\.\d+)?)%/'
artifacts: artifacts:
name: coverage-frontend name: coverage-frontend
expire_in: 31d expire_in: 31d
paths: paths:
- coverage-frontend/ - coverage-frontend/
reports:
cobertura: coverage-frontend/cobertura-coverage.xml
.qa-frontend-node: .qa-frontend-node:
extends: extends:
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
.rails-cache: .rails-cache:
cache: cache:
key: "rails-v1" key: "rails-v2"
paths: paths:
- vendor/ruby/ - vendor/ruby/
- vendor/gitaly-ruby/ - vendor/gitaly-ruby/
...@@ -72,6 +72,15 @@ ...@@ -72,6 +72,15 @@
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
.use-pg12:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.27-lfs-2.9-chrome-83-node-12.x-yarn-1.21-postgresql-12-graphicsmagick-1.3.34"
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg11-ee: .use-pg11-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.27-lfs-2.9-chrome-83-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.27-lfs-2.9-chrome-83-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34"
services: services:
...@@ -82,6 +91,16 @@ ...@@ -82,6 +91,16 @@
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
.use-pg12-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.27-lfs-2.9-chrome-83-node-12.x-yarn-1.21-postgresql-12-graphicsmagick-1.3.34"
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine
- name: elasticsearch:6.4.2
variables:
POSTGRES_HOST_AUTH_METHOD: trust
.use-kaniko: .use-kaniko:
image: image:
name: gcr.io/kaniko-project/executor:debug-v0.20.0 name: gcr.io/kaniko-project/executor:debug-v0.20.0
......
...@@ -49,7 +49,6 @@ update-qa-cache: ...@@ -49,7 +49,6 @@ update-qa-cache:
.package-and-qa-base: .package-and-qa-base:
image: ruby:2.6-alpine image: ruby:2.6-alpine
stage: qa stage: qa
dependencies: []
retry: 0 retry: 0
script: script:
- source scripts/utils.sh - source scripts/utils.sh
......
######################
# rspec job base specs
.rails-job-base: .rails-job-base:
extends: extends:
- .default-retry - .default-retry
- .default-before_script - .default-before_script
- .rails-cache - .rails-cache
.rspec-base:
extends: .rails-job-base
stage: test
needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets"]
script:
- run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn"
- source scripts/rspec_helpers.sh
- rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag ~level:migration"
artifacts:
expire_in: 31d
when: always
paths:
- coverage/
- knapsack/
- rspec_flaky/
- rspec_profiling/
- tmp/capybara/
- tmp/memory_test/
- log/*.log
reports:
junit: junit_rspec.xml
.rspec-base-migration:
extends: .rails:rules:ee-and-foss-migration
script:
- run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn"
- source scripts/rspec_helpers.sh
- rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag level:migration"
.rspec-base-pg11:
extends:
- .rspec-base
- .use-pg11
.rspec-base-pg12:
extends:
- .rspec-base
- .use-pg12
.rspec-base-pg11-as-if-foss:
extends:
- .rspec-base
- .as-if-foss
- .use-pg11
needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets as-if-foss"]
.rspec-ee-base-pg11:
extends:
- .rspec-base
- .use-pg11-ee
.rspec-ee-base-pg12:
extends:
- .rspec-base
- .use-pg12-ee
.rspec-ee-base-geo:
extends: .rspec-base
script:
- run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn"
- source scripts/rspec_helpers.sh
- scripts/prepare_postgres_fdw.sh
- rspec_paralellized_job "--tag ~quarantine --tag geo"
.rspec-ee-base-geo-pg11:
extends:
- .rspec-ee-base-geo
- .use-pg11-ee
.rspec-ee-base-geo-pg12:
extends:
- .rspec-ee-base-geo
- .use-pg12-ee
.db-job-base:
extends:
- .rails-job-base
- .rails:rules:ee-and-foss-migration
- .use-pg11
stage: test
needs: ["setup-test-env"]
# rspec job base specs
######################
############################
# rspec job parallel configs
.rspec-migration-parallel:
parallel: 5
.rspec-ee-migration-parallel:
parallel: 2
.rspec-unit-parallel:
parallel: 20
.rspec-ee-unit-parallel:
parallel: 10
.rspec-ee-unit-geo-parallel:
parallel: 2
.rspec-integration-parallel:
parallel: 8
.rspec-ee-integration-parallel:
parallel: 4
.rspec-system-parallel:
parallel: 24
.rspec-ee-system-parallel:
parallel: 6
# rspec job parallel configs
############################
####################################################### #######################################################
# EE/FOSS: default refs (MRs, master, schedules) jobs # # EE/FOSS: default refs (MRs, master, schedules) jobs #
setup-test-env: setup-test-env:
...@@ -86,73 +206,37 @@ downtime_check: ...@@ -86,73 +206,37 @@ downtime_check:
script: script:
- bundle exec rake downtime_check - bundle exec rake downtime_check
.rspec-base:
extends: .rails-job-base
stage: test
needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets"]
script:
- run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn"
- source scripts/rspec_helpers.sh
- rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag ~level:migration"
artifacts:
expire_in: 31d
when: always
paths:
- coverage/
- knapsack/
- rspec_flaky/
- rspec_profiling/
- tmp/capybara/
- tmp/memory_test/
- log/*.log
reports:
junit: junit_rspec.xml
.rspec-base-pg11:
extends:
- .rspec-base
- .rails:rules:ee-and-foss
- .use-pg11
.rspec-base-migration:
script:
- run_timed_command "scripts/gitaly-test-build"
- run_timed_command "scripts/gitaly-test-spawn"
- source scripts/rspec_helpers.sh
- rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag level:migration"
rspec migration pg11: rspec migration pg11:
extends: extends:
- .rspec-base-pg11 - .rspec-base-pg11
- .rspec-base-migration - .rspec-base-migration
parallel: 5 - .rspec-migration-parallel
rspec unit pg11: rspec unit pg11:
extends: .rspec-base-pg11 extends:
parallel: 20 - .rspec-base-pg11
- .rails:rules:ee-and-foss-unit
- .rspec-unit-parallel
rspec integration pg11: rspec integration pg11:
extends: .rspec-base-pg11 extends:
parallel: 8 - .rspec-base-pg11
- .rails:rules:ee-and-foss-integration
- .rspec-integration-parallel
rspec system pg11: rspec system pg11:
extends: .rspec-base-pg11 extends:
parallel: 24 - .rspec-base-pg11
- .rails:rules:ee-and-foss-system
- .rspec-system-parallel
rspec fast_spec_helper: rspec fast_spec_helper:
extends: .rspec-base-pg11 extends:
- .rspec-base-pg11
- .rails:rules:ee-and-foss-fast_spec_helper
script: script:
- bin/rspec spec/fast_spec_helper.rb - bin/rspec spec/fast_spec_helper.rb
.db-job-base:
extends:
- .rails-job-base
- .rails:rules:ee-and-foss
- .use-pg11
stage: test
needs: ["setup-test-env"]
db:migrate:reset: db:migrate:reset:
extends: .db-job-base extends: .db-job-base
script: script:
...@@ -216,7 +300,7 @@ gitlab:setup: ...@@ -216,7 +300,7 @@ gitlab:setup:
rspec:coverage: rspec:coverage:
extends: