Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab/ci')
-rw-r--r--.gitlab/ci/cng.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/docs.gitlab-ci.yml9
-rw-r--r--.gitlab/ci/frontend.gitlab-ci.yml6
-rw-r--r--.gitlab/ci/global.gitlab-ci.yml34
-rw-r--r--.gitlab/ci/notify.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/qa.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/rails.gitlab-ci.yml33
-rw-r--r--.gitlab/ci/releases.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/review.gitlab-ci.yml4
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml12
-rw-r--r--.gitlab/ci/setup.gitlab-ci.yml6
-rw-r--r--.gitlab/ci/test-metadata.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/verify-lockfile.gitlab-ci.yml11
-rw-r--r--.gitlab/ci/workhorse.gitlab-ci.yml38
14 files changed, 124 insertions, 39 deletions
diff --git a/.gitlab/ci/cng.gitlab-ci.yml b/.gitlab/ci/cng.gitlab-ci.yml
index 269996dfd09..af735d3212a 100644
--- a/.gitlab/ci/cng.gitlab-ci.yml
+++ b/.gitlab/ci/cng.gitlab-ci.yml
@@ -1,6 +1,6 @@
cloud-native-image:
extends: .cng:rules
- image: ruby:2.7-alpine
+ image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7-alpine
dependencies: []
stage: post-test
variables:
diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml
index 955f44c6216..b42b32ea44d 100644
--- a/.gitlab/ci/docs.gitlab-ci.yml
+++ b/.gitlab/ci/docs.gitlab-ci.yml
@@ -2,7 +2,7 @@
extends:
- .default-retry
- .docs:rules:review-docs
- image: ruby:2.7-alpine
+ image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7-alpine
stage: review
needs: []
variables:
@@ -66,13 +66,6 @@ docs-lint links:
- bundle exec nanoc
# Check the internal links
- bundle exec nanoc check internal_links
- # Delete the redirect files, rebuild, and check internal links again, to see if we are linking to redirects.
- # Don't delete the documentation/index.md, which is a false positive for the simple grep.
- - grep -rl "redirect_to:" /tmp/gitlab-docs/content/ee/ | grep -v "development/documentation/index.md" | xargs rm -f
- - bundle exec nanoc
- - echo -e "\e[1;96mThe following test fails when a doc links to a redirect file."
- - echo -e "\e[1;96mMake sure all links point to the correct page."
- - bundle exec nanoc check internal_links
# Check the internal anchor links
- bundle exec nanoc check internal_anchors
diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml
index c87305cab18..1b4b8a12772 100644
--- a/.gitlab/ci/frontend.gitlab-ci.yml
+++ b/.gitlab/ci/frontend.gitlab-ci.yml
@@ -15,7 +15,7 @@
extends:
- .frontend-base
- .assets-compile-cache
- image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-git-2.29-lfs-2.9-node-12.18-yarn-1.22-graphicsmagick-1.3.34
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-git-2.29-lfs-2.9-node-14.15-yarn-1.22-graphicsmagick-1.3.34
variables:
WEBPACK_VENDOR_DLL: "true"
stage: prepare
@@ -259,13 +259,13 @@ coverage-frontend:
qa-frontend-node:10:
extends: .qa-frontend-node
- image: node:dubnium
+ image: ${GITLAB_DEPENDENCY_PROXY}node:dubnium
qa-frontend-node:latest:
extends:
- .qa-frontend-node
- .frontend:rules:qa-frontend-node-latest
- image: node:latest
+ image: ${GITLAB_DEPENDENCY_PROXY}node:latest
webpack-dev-server:
extends:
diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml
index 355607c17ac..5de8a6bc250 100644
--- a/.gitlab/ci/global.gitlab-ci.yml
+++ b/.gitlab/ci/global.gitlab-ci.yml
@@ -16,15 +16,23 @@
- source scripts/utils.sh
- source scripts/prepare_build.sh
-.rails-cache:
+.setup-test-env-cache:
cache:
- key: "rails-v3"
+ key: "setup-test-env-v1"
paths:
- vendor/ruby/
- vendor/gitaly-ruby/
- .go/pkg/mod/
policy: pull
+.rails-cache:
+ cache:
+ key: "rails-v4"
+ paths:
+ - vendor/ruby/
+ - vendor/gitaly-ruby/
+ policy: pull
+
.static-analysis-cache:
cache:
key: "static-analysis-v2"
@@ -71,41 +79,41 @@
policy: pull
.use-pg11:
- image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-golang-1.14-git-2.29-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
+ image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- - name: redis:4.0-alpine
+ - name: redis:5.0-alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg12:
- image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-golang-1.14-git-2.29-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-12-graphicsmagick-1.3.34"
+ image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-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:4.0-alpine
+ - name: redis:5.0-alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg11-ee:
- image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-golang-1.14-git-2.29-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
+ image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- - name: redis:4.0-alpine
- - name: elasticsearch:7.9.2
+ - name: redis:5.0-alpine
+ - name: elasticsearch:7.10.1
command: ["elasticsearch", "-E", "discovery.type=single-node"]
variables:
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg12-ee:
- image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-golang-1.14-git-2.29-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-12-graphicsmagick-1.3.34"
+ image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-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:4.0-alpine
- - name: elasticsearch:7.9.2
+ - name: redis:5.0-alpine
+ - name: elasticsearch:7.10.1
command: ["elasticsearch", "-E", "discovery.type=single-node"]
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -124,7 +132,7 @@
FOSS_ONLY: '1'
.use-docker-in-docker:
- image: docker:${DOCKER_VERSION}
+ image: ${GITLAB_DEPENDENCY_PROXY}docker:${DOCKER_VERSION}
services:
- docker:${DOCKER_VERSION}-dind
variables:
diff --git a/.gitlab/ci/notify.gitlab-ci.yml b/.gitlab/ci/notify.gitlab-ci.yml
index e18a092bb8f..a8c156c7dba 100644
--- a/.gitlab/ci/notify.gitlab-ci.yml
+++ b/.gitlab/ci/notify.gitlab-ci.yml
@@ -1,5 +1,5 @@
.notify-slack:
- image: alpine
+ image: ${GITLAB_DEPENDENCY_PROXY}alpine
stage: notify
dependencies: []
cache: {}
diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml
index 1dc403c9d06..788b482f0a6 100644
--- a/.gitlab/ci/qa.gitlab-ci.yml
+++ b/.gitlab/ci/qa.gitlab-ci.yml
@@ -47,7 +47,7 @@ update-qa-cache:
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
.package-and-qa-base:
- image: ruby:2.7-alpine
+ image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7-alpine
stage: qa
retry: 0
script:
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index a2a16424f4a..22aa92779ea 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -141,6 +141,7 @@
setup-test-env:
extends:
- .rails-job-base
+ - .setup-test-env-cache
- .rails:rules:default-refs-code-backstage-qa
- .use-pg11
stage: prepare
@@ -180,11 +181,19 @@ setup-test-env:
- tmp/tests/second_storage/
when: always
-update-rails-cache:
+update-setup-test-env-cache:
extends:
- setup-test-env
- .shared:rules:update-cache
- artifacts: {} # This job's purpose is only to update the cache.
+ artifacts:
+ paths: [] # This job's purpose is only to update the cache.
+ cache:
+ policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
+
+update-rails-cache:
+ extends:
+ - update-setup-test-env-cache
+ - .rails-cache
cache:
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
@@ -376,6 +385,17 @@ db:rollback:
- bundle exec rake db:migrate VERSION=20181228175414
- bundle exec rake db:migrate SKIP_SCHEMA_VERSION_CHECK=true
+db:gitlabcom-database-testing:
+ extends: .rails:rules:db:gitlabcom-database-testing
+ stage: test
+ image: ruby:2.7-alpine
+ needs: []
+ allow_failure: true
+ script:
+ - source scripts/utils.sh
+ - install_gitlab_gem
+ - ./scripts/trigger-build gitlab-com-database-testing
+
gitlab:setup:
extends: .db-job-base
variables:
@@ -433,6 +453,8 @@ rspec:deprecations:
variables:
SETUP_DB: "false"
script:
+ - grep -h -R "keyword" deprecations/ | awk '{$1=$1};1' | sort | uniq -c | sort
+ - grep -R "keyword" deprecations/ | wc
- run_timed_command "bundle exec rubocop --only Lint/LastKeywordArgument --parallel"
artifacts:
expire_in: 31d
@@ -482,7 +504,6 @@ rspec:feature-flags:
- .coverage-base
- .rails:rules:rspec-feature-flags
stage: post-test
- allow_failure: true
# We cannot use needs since it would mean needing 84 jobs (since most are parallelized)
# so we use `dependencies` here.
dependencies:
@@ -502,7 +523,11 @@ rspec:feature-flags:
- memory-on-boot
script:
- run_timed_command "bundle install --jobs=$(nproc) --path=vendor --retry=3 --quiet --without default development test production puma unicorn kerberos metrics omnibus ed25519"
- - 'run_timed_command "bundle exec scripts/used-feature-flags" || (scripts/slack master-broken "☠️ \`${CI_JOB_NAME}\` failed! ☠️ See ${CI_JOB_URL}" ci_failing "GitLab Bot" && exit 1)'
+ - if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
+ run_timed_command "bundle exec scripts/used-feature-flags" || (scripts/slack master-broken "☠️ \`${CI_JOB_NAME}\` failed! ☠️ See ${CI_JOB_URL}" ci_failing "GitLab Bot" && exit 1);
+ else
+ run_timed_command "bundle exec scripts/used-feature-flags";
+ fi
# EE/FOSS: default refs (MRs, master, schedules) jobs #
#######################################################
diff --git a/.gitlab/ci/releases.gitlab-ci.yml b/.gitlab/ci/releases.gitlab-ci.yml
index b3f961afe62..77f23814f3c 100644
--- a/.gitlab/ci/releases.gitlab-ci.yml
+++ b/.gitlab/ci/releases.gitlab-ci.yml
@@ -4,7 +4,7 @@
.merge-train-sync:
# We don't need/want any global before/after commands, so we overwrite these
# settings.
- image: alpine:edge
+ image: ${GITLAB_DEPENDENCY_PROXY}alpine:edge
stage: sync
before_script:
- apk add --no-cache --update curl bash jq
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml
index b7d9f18dcb4..c18e898dc12 100644
--- a/.gitlab/ci/review.gitlab-ci.yml
+++ b/.gitlab/ci/review.gitlab-ci.yml
@@ -25,7 +25,7 @@ review-build-cng:
extends:
- .default-retry
- .review:rules:review-build-cng
- image: ruby:2.7-alpine
+ image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7-alpine
stage: review-prepare
before_script:
- source ./scripts/utils.sh
@@ -199,7 +199,7 @@ review-performance:
parallel-spec-reports:
extends:
- .review:rules:mr-only-manual
- image: ruby:2.7-alpine
+ image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7-alpine
stage: post-qa
dependencies: ["review-qa-all"]
variables:
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 5e8cdf0daaf..1eafd024f5e 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -112,6 +112,7 @@
.workhorse-patterns: &workhorse-patterns
- "GITLAB_WORKHORSE_VERSION"
- "workhorse/**/*"
+ - ".gitlab/ci/workhorse.gitlab-ci.yml"
.yaml-lint-patterns: &yaml-lint-patterns
- ".gitlab-ci.yml"
@@ -123,9 +124,12 @@
- ".gitlab/route-map.yml"
- "doc/**/*"
- ".markdownlint.json"
+ - "scripts/lint-doc.sh"
.frontend-dependency-patterns: &frontend-dependency-patterns
- "{package.json,yarn.lock}"
+ - "config/webpack.config.js"
+ - "config/helpers/*.js"
.frontend-patterns: &frontend-patterns
- "{package.json,yarn.lock}"
@@ -523,6 +527,13 @@
changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec
+.rails:rules:db:gitlabcom-database-testing:
+ rules:
+ - if: '$GITLABCOM_DATABASE_TESTING_TRIGGER_TOKEN == null'
+ when: never
+ - <<: *if-merge-request
+ changes: *db-patterns
+
.rails:rules:ee-and-foss-unit:
rules:
- changes: *backend-patterns
@@ -869,6 +880,7 @@
- <<: *if-not-ee
when: never
- <<: *if-master-schedule-2-hourly
+ allow_failure: true
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:master-schedule-nightly--code-backstage:
diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml
index 74510a0a03a..27b68115edc 100644
--- a/.gitlab/ci/setup.gitlab-ci.yml
+++ b/.gitlab/ci/setup.gitlab-ci.yml
@@ -26,7 +26,7 @@ cache gems:
dont-interrupt-me:
extends: .setup:rules:dont-interrupt-me
stage: sync
- image: alpine:edge
+ image: ${GITLAB_DEPENDENCY_PROXY}alpine:edge
interruptible: false
variables:
GIT_STRATEGY: none
@@ -52,7 +52,7 @@ no_ee_check:
verify-tests-yml:
extends:
- .setup:rules:verify-tests-yml
- image: ruby:2.7-alpine
+ image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7-alpine
stage: test
needs: []
script:
@@ -61,7 +61,7 @@ verify-tests-yml:
- scripts/verify-tff-mapping
.detect-test-base:
- image: ruby:2.7
+ image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7
needs: []
stage: prepare
script:
diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml
index aec0a1640f1..b90c02c08ef 100644
--- a/.gitlab/ci/test-metadata.gitlab-ci.yml
+++ b/.gitlab/ci/test-metadata.gitlab-ci.yml
@@ -1,5 +1,5 @@
.tests-metadata-state:
- image: ruby:2.7
+ image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7
before_script:
- source scripts/utils.sh
artifacts:
diff --git a/.gitlab/ci/verify-lockfile.gitlab-ci.yml b/.gitlab/ci/verify-lockfile.gitlab-ci.yml
new file mode 100644
index 00000000000..6336a428b4b
--- /dev/null
+++ b/.gitlab/ci/verify-lockfile.gitlab-ci.yml
@@ -0,0 +1,11 @@
+verify_lockfile:
+ stage: test
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-git-2.29-lfs-2.9-node-14.15-yarn-1.22-graphicsmagick-1.3.34
+ needs: []
+ rules:
+ - changes:
+ - yarn.lock
+ script:
+ - npm config set @dappelt:registry https://gitlab.com/api/v4/projects/22564149/packages/npm/
+ - npx lockfile-lint@4.3.7 --path yarn.lock --allowed-hosts yarn --validate-https
+ - npx @dappelt/untamper-my-lockfile --lockfile yarn.lock
diff --git a/.gitlab/ci/workhorse.gitlab-ci.yml b/.gitlab/ci/workhorse.gitlab-ci.yml
index 29131159876..a40eebd131b 100644
--- a/.gitlab/ci/workhorse.gitlab-ci.yml
+++ b/.gitlab/ci/workhorse.gitlab-ci.yml
@@ -1,6 +1,6 @@
workhorse:
extends: .workhorse:rules:workhorse
- image: golang:1.14
+ image: ${GITLAB_DEPENDENCY_PROXY}golang:1.14
stage: test
needs: []
script:
@@ -8,3 +8,39 @@ workhorse:
- git checkout .
- scripts/update-workhorse check
- make -C workhorse
+
+workhorse:verify:
+ extends: .workhorse:rules:workhorse
+ image: ${GITLAB_DEPENDENCY_PROXY}golang:1.15
+ stage: test
+ needs: []
+ script:
+ - make -C workhorse verify
+
+.workhorse:test:
+ extends: .workhorse:rules:workhorse
+ services:
+ - name: registry.gitlab.com/gitlab-org/build/cng/gitaly:latest
+ # Disable the hooks so we don't have to stub the GitLab API
+ command: ["/usr/bin/env", "GITALY_TESTING_NO_GIT_HOOKS=1", "/scripts/process-wrapper"]
+ alias: gitaly
+ variables:
+ GITALY_ADDRESS: "tcp://gitaly:8075"
+ stage: test
+ needs: []
+ script:
+ - go version
+ - apt-get update && apt-get -y install libimage-exiftool-perl
+ - make -C workhorse test
+
+workhorse:test using go 1.13:
+ extends: .workhorse:test
+ image: ${GITLAB_DEPENDENCY_PROXY}golang:1.13
+
+workhorse:test using go 1.14:
+ extends: .workhorse:test
+ image: ${GITLAB_DEPENDENCY_PROXY}golang:1.14
+
+workhorse:test using go 1.15:
+ extends: .workhorse:test
+ image: ${GITLAB_DEPENDENCY_PROXY}golang:1.15