diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-28 15:10:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-28 15:10:09 +0300 |
commit | 0805030d634b48c8a44308330fe0d99ba8434f46 (patch) | |
tree | e4a345925e62addad4c5de4744493dc8a386c6ef /.gitlab/ci | |
parent | d6024427e8036c93ccf04759a3725167ec6c02f4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to '.gitlab/ci')
-rw-r--r-- | .gitlab/ci/frontend.gitlab-ci.yml | 21 | ||||
-rw-r--r-- | .gitlab/ci/pages.gitlab-ci.yml | 2 | ||||
-rw-r--r-- | .gitlab/ci/rails.gitlab-ci.yml | 8 | ||||
-rw-r--r-- | .gitlab/ci/review.gitlab-ci.yml | 19 | ||||
-rw-r--r-- | .gitlab/ci/rules.gitlab-ci.yml | 29 |
5 files changed, 52 insertions, 27 deletions
diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index c39f5cdce9c..e713605d386 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -121,7 +121,7 @@ rspec frontend_fixture as-if-foss: rspec-ee frontend_fixture: extends: - .frontend-fixtures-base - - .frontend:rules:default-frontend-jobs + - .frontend:rules:default-frontend-jobs-ee parallel: 2 graphql-schema-dump: @@ -169,8 +169,10 @@ karma: extends: - .karma-base - .frontend:rules:default-frontend-jobs - # Don't use `needs` since `rspec-ee frontend_fixture` doesn't exist in `gitlab-foss` pipelines. - dependencies: ["rspec frontend_fixture", "rspec-ee frontend_fixture"] + needs: + - job: "rspec frontend_fixture" + - job: "rspec-ee frontend_fixture" + optional: true coverage: '/^Statements *: (\d+\.\d+%)/' artifacts: name: coverage-javascript @@ -201,8 +203,10 @@ jest: extends: - .jest-base - .frontend:rules:default-frontend-jobs - # Don't use `needs` since `rspec-ee frontend_fixture` doesn't exist in `gitlab-foss` pipelines. - dependencies: ["rspec frontend_fixture", "rspec-ee frontend_fixture"] + needs: + - job: "rspec frontend_fixture" + - job: "rspec-ee frontend_fixture" + optional: true artifacts: name: coverage-frontend expire_in: 31d @@ -222,8 +226,11 @@ jest-integration: script: - *yarn-install - run_timed_command "yarn jest:integration --ci" - # Don't use `needs` since `rspec-ee frontend_fixture` doesn't exist in `gitlab-foss` pipelines. - dependencies: ["rspec frontend_fixture", "rspec-ee frontend_fixture", "graphql-schema-dump"] + needs: + - job: "rspec frontend_fixture" + - job: "rspec-ee frontend_fixture" + optional: true + - job: "graphql-schema-dump" jest-as-if-foss: extends: diff --git a/.gitlab/ci/pages.gitlab-ci.yml b/.gitlab/ci/pages.gitlab-ci.yml index 4961bd508d3..b6d4b0ef11d 100644 --- a/.gitlab/ci/pages.gitlab-ci.yml +++ b/.gitlab/ci/pages.gitlab-ci.yml @@ -3,7 +3,7 @@ pages: - .default-retry - .pages:rules stage: pages - dependencies: + needs: - rspec:coverage - coverage-frontend - karma diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 074a006dc1b..620de209495 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -250,13 +250,19 @@ update-static-analysis-cache: static-analysis: extends: - .static-analysis-base - - .rails:rules:code-backstage-qa + - .static-analysis:rules:ee-and-foss stage: test parallel: 4 script: - run_timed_command "retry yarn install --frozen-lockfile" - scripts/static-analysis +static-analysis as-if-foss: + extends: + - static-analysis + - .static-analysis:rules:as-if-foss + - .as-if-foss + rspec migration pg11: extends: - .rspec-base-pg11 diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index e1037edc325..78305a651d1 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -35,9 +35,6 @@ review-build-cng: artifacts: false script: - BUILD_TRIGGER_TOKEN=$REVIEW_APPS_BUILD_TRIGGER_TOKEN ./scripts/trigger-build cng - # When the job is manual, review-deploy is also manual and we don't want people - # to have to manually start the jobs in sequence, so we do it for them. - - '[ -z $CI_JOB_MANUAL ] || scripts/api/play_job.rb --job-name "review-deploy"' .review-workflow-base: extends: @@ -59,7 +56,7 @@ review-deploy: - .review-workflow-base - .review:rules:review-deploy stage: review - dependencies: [] + needs: ["review-build-cng"] resource_group: "review/${CI_COMMIT_REF_NAME}" before_script: - export GITLAB_SHELL_VERSION=$(<GITLAB_SHELL_VERSION) @@ -75,10 +72,6 @@ review-deploy: - date - deploy || (display_deployment_debug && exit 1) - disable_sign_ups || (delete_release && exit 1) - # When the job is manual, review-qa-smoke is also manual and we don't want people - # to have to manually start the jobs in sequence, so we do it for them. - - '[ -z $CI_JOB_MANUAL ] || scripts/api/play_job.rb --job-name "review-qa-smoke"' - - '[ -z $CI_JOB_MANUAL ] || scripts/api/play_job.rb --job-name "review-performance"' after_script: # Run seed-dast-test-data.sh only when DAST_RUN is set to true. This is to pupulate review app with data for DAST scan. # Set DAST_RUN to true when jobs are manually scheduled. @@ -123,9 +116,7 @@ review-stop: - .use-docker-in-docker image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.7 stage: qa - # This is needed so that manual jobs with needs don't block the pipeline. - # See https://gitlab.com/gitlab-org/gitlab/-/issues/199979. - dependencies: ["review-deploy"] + needs: ["review-deploy"] variables: QA_ARTIFACTS_DIR: "${CI_PROJECT_DIR}/qa" QA_CAN_TEST_GIT_PROTOCOL_V2: "false" @@ -175,9 +166,7 @@ review-performance: name: sitespeedio/sitespeed.io entrypoint: [""] stage: qa - # This is needed so that manual jobs with needs don't block the pipeline. - # See https://gitlab.com/gitlab-org/gitlab/-/issues/199979. - dependencies: ["review-deploy"] + needs: ["review-deploy"] before_script: - export CI_ENVIRONMENT_URL="$(cat environment_url.txt)" - echo "${CI_ENVIRONMENT_URL}" @@ -200,7 +189,7 @@ parallel-spec-reports: - .review:rules:review-qa-all image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7-alpine stage: post-qa - dependencies: ["review-qa-all"] + needs: ["review-qa-all"] variables: NEW_PARALLEL_SPECS_REPORT: qa/report-new.html BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/" diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index a967d77441b..23c2dbd7ba3 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -424,6 +424,13 @@ - <<: *if-default-refs changes: *code-backstage-patterns +.frontend:rules:default-frontend-jobs-ee: + rules: + - <<: *if-not-ee + when: never + - <<: *if-default-refs + changes: *code-backstage-patterns + .frontend:rules:default-frontend-jobs-as-if-foss: rules: - <<: *if-not-ee @@ -931,6 +938,25 @@ - <<: *if-merge-request changes: [".gitlab/ci/rails.gitlab-ci.yml"] +######################### +# Static analysis rules # +######################### + +.static-analysis:rules:ee-and-foss: + rules: + - changes: *code-backstage-qa-patterns + +.static-analysis:rules:as-if-foss: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-title-as-if-foss + changes: *code-backstage-qa-patterns + - <<: *if-security-merge-request + changes: *code-backstage-qa-patterns + - <<: *if-merge-request + changes: *ci-patterns + ####################### # Vendored gems rules # ####################### @@ -1050,7 +1076,6 @@ allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *code-patterns - when: manual allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *qa-patterns @@ -1071,7 +1096,6 @@ allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *code-qa-patterns - when: manual allow_failure: true - <<: *if-dot-com-gitlab-org-schedule allow_failure: true @@ -1094,7 +1118,6 @@ allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request changes: *code-qa-patterns - when: manual allow_failure: true .review:rules:review-qa-all: |