Commit bca0f605 authored by Kyle Wiebers's avatar Kyle Wiebers

Add DAG to setup-test-env jobs and review-cng-base to speed up pipeline

Add needs for all jobs which require setup-test-env and
move review-build-cng to additional stage review-prepare
to decrease wait time for jobs in pipeline
parent 700bdfc7
...@@ -5,6 +5,7 @@ stages: ...@@ -5,6 +5,7 @@ stages:
- prepare - prepare
- quick-test - quick-test
- test - test
- review-prepare
- review - review
- qa - qa
- post-test - post-test
......
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
- .default-before_script - .default-before_script
- .except-docs - .except-docs
image: dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.6.3-git-2.22-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-18.06.1 image: dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.6.3-git-2.22-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-18.06.1
stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
services: services:
- docker:19.03.0-dind - docker:19.03.0-dind
variables: variables:
...@@ -42,10 +44,6 @@ ...@@ -42,10 +44,6 @@
- time scripts/build_assets_image - time scripts/build_assets_image
- scripts/clean-old-cached-assets - scripts/clean-old-cached-assets
- rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here - rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here
# Play dependent manual jobs
- install_api_client_dependencies_with_apt
- play_job "review-build-cng" || true # this job might not exist so ignore the failure if it cannot be played
- play_job "schedule:review-build-cng" || true # this job might not exist so ignore the failure if it cannot be played
only: only:
- /.+/@gitlab-org/gitlab-ce - /.+/@gitlab-org/gitlab-ce
- /.+/@gitlab-org/gitlab-ee - /.+/@gitlab-org/gitlab-ee
...@@ -186,7 +184,8 @@ jest: ...@@ -186,7 +184,8 @@ jest:
- .default-retry - .default-retry
- .default-cache - .default-cache
- .except-docs - .except-docs
dependencies: ["setup-test-env"] dependencies: []
stage: test
variables: variables:
SETUP_DB: "false" SETUP_DB: "false"
before_script: before_script:
......
...@@ -165,7 +165,9 @@ downtime_check: ...@@ -165,7 +165,9 @@ downtime_check:
- /^[\d-]+-stable(-ee)?$/ - /^[\d-]+-stable(-ee)?$/
- /(^docs[\/-].+|.+-docs$)/ - /(^docs[\/-].+|.+-docs$)/
- /(^qa[\/-].*|.*-qa$)/ - /(^qa[\/-].*|.*-qa$)/
stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
ee_compat_check: ee_compat_check:
extends: .rake-exec extends: .rake-exec
...@@ -195,7 +197,9 @@ db:migrate:reset: ...@@ -195,7 +197,9 @@ db:migrate:reset:
- .default-before_script - .default-before_script
- .use-pg - .use-pg
- .except-docs-qa - .except-docs-qa
stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
script: script:
- bundle exec rake db:migrate:reset - bundle exec rake db:migrate:reset
...@@ -207,7 +211,9 @@ db:check-schema: ...@@ -207,7 +211,9 @@ db:check-schema:
- .default-before_script - .default-before_script
- .use-pg - .use-pg
- .except-docs-qa - .except-docs-qa
stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
script: script:
- source scripts/schema_changed.sh - source scripts/schema_changed.sh
...@@ -219,7 +225,9 @@ db:migrate-from-v11.11.0: ...@@ -219,7 +225,9 @@ db:migrate-from-v11.11.0:
- .default-before_script - .default-before_script
- .use-pg - .use-pg
- .except-docs-qa - .except-docs-qa
stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
variables: variables:
SETUP_DB: "false" SETUP_DB: "false"
script: script:
...@@ -248,7 +256,9 @@ db:rollback: ...@@ -248,7 +256,9 @@ db:rollback:
- .default-before_script - .default-before_script
- .use-pg - .use-pg
- .except-docs-qa - .except-docs-qa
stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
script: script:
- bundle exec rake db:migrate VERSION=20180101160629 - bundle exec rake db:migrate VERSION=20180101160629
- bundle exec rake db:migrate SKIP_SCHEMA_VERSION_CHECK=true - bundle exec rake db:migrate SKIP_SCHEMA_VERSION_CHECK=true
...@@ -261,7 +271,9 @@ gitlab:setup: ...@@ -261,7 +271,9 @@ gitlab:setup:
- .default-before_script - .default-before_script
- .use-pg - .use-pg
- .except-docs-qa - .except-docs-qa
stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
variables: variables:
SETUP_DB: "false" SETUP_DB: "false"
script: script:
......
...@@ -53,8 +53,7 @@ build-qa-image: ...@@ -53,8 +53,7 @@ build-qa-image:
.review-build-cng-base: .review-build-cng-base:
image: ruby:2.6-alpine image: ruby:2.6-alpine
stage: test stage: review-prepare
when: manual
before_script: before_script:
- source scripts/utils.sh - source scripts/utils.sh
- install_api_client_dependencies_with_apk - install_api_client_dependencies_with_apk
...@@ -67,17 +66,20 @@ review-build-cng: ...@@ -67,17 +66,20 @@ review-build-cng:
extends: extends:
- .review-build-cng-base - .review-build-cng-base
- .review-only - .review-only
needs: ["gitlab:assets:compile pull-cache"]
schedule:review-build-cng: schedule:review-build-cng:
extends: extends:
- .review-build-cng-base - .review-build-cng-base
- .review-schedules-only - .review-schedules-only
needs: ["gitlab:assets:compile"]
review-deploy: review-deploy:
extends: .review-base extends: .review-base
allow_failure: true allow_failure: true
retry: 1 retry: 1
stage: review stage: review
needs: ["review-build-cng"]
variables: variables:
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}" HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}" DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
......
...@@ -7,7 +7,9 @@ cache gems: ...@@ -7,7 +7,9 @@ cache gems:
- .default-cache - .default-cache
- .default-before_script - .default-before_script
- .except-docs - .except-docs
stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
variables: variables:
SETUP_DB: "false" SETUP_DB: "false"
script: script:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment