diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-15 21:10:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-15 21:10:36 +0300 |
commit | 99aa31992d4398d35c9df4854f5fb494984a9e0b (patch) | |
tree | c2ca79f7ea8e5daaf8e62b5d523a986331d97647 /.gitlab/ci | |
parent | 229395d3af51cd46a9179f2eba142c027d08b208 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to '.gitlab/ci')
-rw-r--r-- | .gitlab/ci/rules.gitlab-ci.yml | 66 | ||||
-rw-r--r-- | .gitlab/ci/static-analysis.gitlab-ci.yml | 3 |
2 files changed, 45 insertions, 24 deletions
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index eeacff51454..1e10050ffd6 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -20,20 +20,11 @@ if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG || $FORCE_GITLAB_CI' .if-default-branch-refs: &if-default-branch-refs - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' - -.if-stable-branch-refs: &if-stable-branch-refs - if: '$CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/' - -.if-default-branch-push: &if-default-branch-push - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"' + if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID == null' .if-auto-deploy-branches: &if-auto-deploy-branches if: '$CI_COMMIT_BRANCH =~ /^\d+-\d+-auto-deploy-\d+$/' -.if-tag: &if-tag - if: '$CI_COMMIT_TAG' - .if-default-branch-or-tag: &if-default-branch-or-tag if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG' @@ -637,6 +628,8 @@ rules: - <<: *if-not-ee when: never + - <<: *if-not-canonical-namespace + when: never - <<: *if-merge-request-targeting-stable-branch - <<: *if-merge-request-labels-run-review-app - <<: *if-dot-com-gitlab-org-and-security-merge-request @@ -726,8 +719,6 @@ .frontend:rules:minimal-default-rules: rules: - - <<: *if-merge-request-approved - when: never - <<: *if-automated-merge-request when: never - <<: *if-security-merge-request @@ -789,17 +780,13 @@ - <<: *if-fork-merge-request when: never - <<: *if-merge-request-labels-run-all-jest - - <<: *if-default-refs - changes: *core-frontend-patterns - <<: *if-merge-request - changes: *ci-patterns + changes: [".gitlab/ci/rules.gitlab-ci.yml", ".gitlab/ci/frontend.gitlab-ci.yml"] - <<: *if-automated-merge-request changes: *code-backstage-patterns - <<: *if-security-merge-request changes: *code-backstage-patterns - - <<: *if-merge-request-not-approved - when: never - - <<: *if-default-refs + - <<: *if-default-branch-refs changes: *code-backstage-patterns .frontend:rules:jest:minimal: @@ -824,10 +811,6 @@ - <<: *if-merge-request-labels-run-all-jest - <<: *if-security-merge-request changes: *code-backstage-patterns - - <<: *if-merge-request-not-approved - when: never - - <<: *if-merge-request - changes: *frontend-patterns-for-as-if-foss .frontend:rules:jest:minimal:as-if-foss: rules: @@ -945,7 +928,7 @@ .qa:rules:package-and-test: rules: - - <<: *if-fork-merge-request + - <<: *if-not-canonical-namespace when: never - <<: *if-not-ee when: never @@ -1682,6 +1665,10 @@ .review-change-pattern: &review-change-pattern APP_CHANGE_TRIGGER: "true" +# The following rules needs to be the same as the one for .review:rules:review-cleanup +# except that: +# - most rules re automatic here (i.e. no `when: manual`) and not allowed to fail (i.e. no `allow_failure: true`) here +# - several rules have `variables: *review-change-pattern` here .review:rules:start-review-app-pipeline: rules: - <<: *if-not-ee @@ -1736,11 +1723,44 @@ rules: - when: on_success +# The following rules needs to be the same as the one for .review:rules:start-review-app-pipeline +# except that: +# - all rules have `when: manual` and `allow_failure: true` here .review:rules:review-cleanup: rules: - <<: *if-not-ee when: never + - <<: *if-merge-request-labels-pipeline-revert + when: never + - <<: *if-merge-request-labels-run-review-app + when: manual + allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request + changes: *ci-review-patterns + when: manual + allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: *frontend-build-patterns + when: manual + allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: *controllers-patterns + when: manual + allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: *models-patterns + when: manual + allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: *lib-gitlab-patterns + when: manual + allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: *qa-patterns + when: manual + allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: *code-patterns when: manual allow_failure: true - <<: *if-dot-com-gitlab-org-schedule diff --git a/.gitlab/ci/static-analysis.gitlab-ci.yml b/.gitlab/ci/static-analysis.gitlab-ci.yml index a815ddc95f1..e845e7eb88b 100644 --- a/.gitlab/ci/static-analysis.gitlab-ci.yml +++ b/.gitlab/ci/static-analysis.gitlab-ci.yml @@ -132,7 +132,8 @@ rubocop: unset CI_SLACK_WEBHOOK_URL run_timed_command "bundle exec rake rubocop:check:graceful" else - run_timed_command "bundle exec rubocop --parallel --force-exclusion $(cat ${RSPEC_CHANGED_FILES_PATH})" + cat ${RSPEC_CHANGED_FILES_PATH} | ruby -e 'puts $stdin.read.split(" ").select { |f| File.exist?(f) }.join(" ")' > tmp/rubocop_target_files.txt + run_timed_command "bundle exec rubocop --parallel --force-exclusion $(cat tmp/rubocop_target_files.txt)" fi qa:metadata-lint: |