diff --git a/.gitlab/ci/caching.gitlab-ci.yml b/.gitlab/ci/caching.gitlab-ci.yml index 589032e66ea..97d4f2f7264 100644 --- a/.gitlab/ci/caching.gitlab-ci.yml +++ b/.gitlab/ci/caching.gitlab-ci.yml @@ -51,3 +51,15 @@ cache-assets:production: variables: NODE_ENV: "production" RAILS_ENV: "production" + +packages-cleanup: + extends: + - .default-retry + - .caching:rules:packages-cleanup + image: ${GITLAB_DEPENDENCY_PROXY}ruby:${RUBY_VERSION} + stage: prepare + before_script: + - source scripts/utils.sh + - install_gitlab_gem + script: + - scripts/packages/automated_cleanup.rb diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index 5903b0ba7f7..aefa96da159 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -17,7 +17,7 @@ review-cleanup: script: - delete_release - delete_namespace - - ruby -rrubygems scripts/review_apps/automated_cleanup.rb + - scripts/review_apps/automated_cleanup.rb - gcp_cleanup start-review-app-pipeline: diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 35909ca8637..c876dfef27c 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -673,7 +673,9 @@ ################# .caching:rules:cache-workhorse: rules: - - <<: *if-dot-com-ee-schedule + # That would run for any project that has a "maintenance" pipeline schedule + # but in fact, the cache package is only uploaded for gitlab.com/gitlab-org/gitlab and jihulab.com/gitlab-cn/gitlab + - <<: *if-default-branch-schedule-maintenance - <<: *if-dot-com-gitlab-org-default-branch changes: ["workhorse/**/*"] - <<: *if-dot-com-gitlab-org-merge-request @@ -688,7 +690,9 @@ # The new strategy to cache assets as generic packages is experimental and can be disabled by removing the `CACHE_ASSETS_AS_PACKAGE` variable - if: '$CACHE_ASSETS_AS_PACKAGE != "true"' when: never - - <<: *if-dot-com-ee-schedule + # That would run for any project that has a "maintenance" pipeline schedule + # but in fact, the cache package is only uploaded for gitlab.com/gitlab-org/gitlab and jihulab.com/gitlab-cn/gitlab + - <<: *if-default-branch-schedule-maintenance - <<: *if-dot-com-gitlab-org-default-branch changes: *assets-compilation-patterns - <<: *if-dot-com-gitlab-org-merge-request @@ -699,6 +703,21 @@ when: manual allow_failure: true +.caching:rules:packages-cleanup: + rules: + # The new strategy to cache assets as generic packages is experimental and can be disabled by removing the `CACHE_ASSETS_AS_PACKAGE` variable + - if: '$CACHE_ASSETS_AS_PACKAGE != "true"' + when: never + # That would run for any project that has a "maintenance" pipeline schedule + # but in fact, the cache package is only uploaded for gitlab.com/gitlab-org/gitlab and jihulab.com/gitlab-cn/gitlab + - <<: *if-default-branch-schedule-maintenance + - <<: *if-dot-com-gitlab-org-merge-request + changes: + - ".gitlab/ci/caching.gitlab-ci.yml" + - "scripts/packages/automated_cleanup.rb" + when: manual + allow_failure: true + ###################### # CI Templates Rules # ###################### diff --git a/app/assets/javascripts/merge_requests/components/sticky_header.vue b/app/assets/javascripts/merge_requests/components/sticky_header.vue index f067982fce1..b7629ba001f 100644 --- a/app/assets/javascripts/merge_requests/components/sticky_header.vue +++ b/app/assets/javascripts/merge_requests/components/sticky_header.vue @@ -86,6 +86,7 @@ export default {