diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f832b88b82187dd3c6c51245fbe17432130e87da..9c6b84d3931535c164c3c67757977cebe46ae9b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,7 +67,7 @@ variables: RAILS_ENV: "test" NODE_ENV: "test" BUNDLE_WITHOUT: "production:development" - BUNDLE_INSTALL_FLAGS: "--jobs=$(nproc) --retry=3 --quiet" + BUNDLE_INSTALL_FLAGS: "--jobs=$(nproc) --retry=3" BUNDLE_FROZEN: "true" # we override the max_old_space_size to prevent OOM errors NODE_OPTIONS: --max_old_space_size=3584 diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 6fc381fc7c2f150d04003a3bcf58cdea5afcb8cf..6f18a76a21c8ab95780b322d51cbb804258480ed 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -1792,6 +1792,10 @@ when: never - <<: *if-default-branch-or-tag changes: *code-backstage-qa-patterns + - <<: *if-dot-com-gitlab-org-merge-request + changes: [".gitlab/ci/setup.gitlab-ci.yml"] + when: manual + allow_failure: true .setup:rules:dont-interrupt-me: rules: diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml index 2631bae0c9a8444051b1c9bab4482052017a7499..63ee02d3143d865360c27a1e18a185f1b74f40b5 100644 --- a/.gitlab/ci/setup.gitlab-ci.yml +++ b/.gitlab/ci/setup.gitlab-ci.yml @@ -3,16 +3,20 @@ cache gems: extends: - .default-retry - - .rails-cache + - .ruby-cache - .default-before_script - .setup:rules:cache-gems - stage: test - needs: ["setup-test-env"] + stage: prepare + needs: [] variables: - BUNDLE_INSTALL_FLAGS: --with=production --with=development --with=test --jobs=2 --path=vendor --retry=3 --quiet + BUNDLE_WITHOUT: "" + BUNDLE_WITH: "production:development:test" SETUP_DB: "false" script: - - bundle package --all --all-platforms + - echo -e "\e[0Ksection_start:`date +%s`:bundle-package[collapsed=true]\r\e[0KPackaging gems" + - bundle config set cache_all true + - run_timed_command "bundle package --all-platforms" + - echo -e "\e[0Ksection_end:`date +%s`:bundle-package\r\e[0K" artifacts: paths: - vendor/cache diff --git a/scripts/utils.sh b/scripts/utils.sh index 8db525abc933be4bf1b4cee3f048c22d81a36d5a..10b7f856ee64deccb236b323d75b3639ef4782e7 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -38,6 +38,8 @@ function bundle_install_script() { exit 1; fi; + echo -e "section_start:`date +%s`:bundle-install[collapsed=true]\r\e[0KInstalling gems" + gem --version bundle --version gem install bundler --no-document --conservative --version 2.3.15 @@ -48,7 +50,7 @@ function bundle_install_script() { echo "${BUNDLE_WITHOUT}" bundle config - run_timed_command "bundle install ${BUNDLE_INSTALL_FLAGS} ${extra_install_args} && bundle check" + run_timed_command "bundle install ${BUNDLE_INSTALL_FLAGS} ${extra_install_args}" if [[ $(bundle info pg) ]]; then # When we test multiple versions of PG in the same pipeline, we have a single `setup-test-env` @@ -56,6 +58,8 @@ function bundle_install_script() { # Uncomment the following line if multiple versions of PG are tested in the same pipeline. run_timed_command "bundle pristine pg" fi + + echo -e "section_end:`date +%s`:bundle-install\r\e[0K" } function setup_db_user_only() {