From e4220eeccaf1d53444fdd9102a4061336f91784e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 18 Oct 2022 18:09:22 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/caching.gitlab-ci.yml | 2 +- .gitlab/ci/frontend.gitlab-ci.yml | 35 +++++++++++++++-------------------- .gitlab/ci/global.gitlab-ci.yml | 6 +++++- 3 files changed, 21 insertions(+), 22 deletions(-) (limited to '.gitlab') diff --git a/.gitlab/ci/caching.gitlab-ci.yml b/.gitlab/ci/caching.gitlab-ci.yml index 97d4f2f7264..6a13fc3c56f 100644 --- a/.gitlab/ci/caching.gitlab-ci.yml +++ b/.gitlab/ci/caching.gitlab-ci.yml @@ -29,7 +29,7 @@ cache-workhorse: variables: WEBPACK_REPORT: "false" script: - - !reference [.yarn-install, script] + - yarn_install_script - export GITLAB_ASSETS_HASH=$(bundle exec rake gitlab:assets:hash_sum) - source scripts/gitlab_component_helpers.sh - 'gitlab_assets_archive_doesnt_exist || { echoinfo "INFO: Exiting early as package exists."; exit 0; }' diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 00ac68782e6..085c0aa890d 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -1,13 +1,3 @@ -.yarn-install: - script: - - source scripts/utils.sh - - yarn_install_script - -.storybook-yarn-install: - script: - - source scripts/utils.sh - - run_timed_command "retry yarn run storybook:install --frozen-lockfile" - .compile-assets-base: extends: - .default-retry @@ -98,20 +88,22 @@ update-assets-compile-test-cache: update-yarn-cache: extends: - .default-retry + - .default-utils-before_script - .yarn-cache-push - .shared:rules:update-cache stage: prepare script: - - !reference [.yarn-install, script] + - yarn_install_script update-storybook-yarn-cache: extends: - .default-retry + - .default-utils-before_script - .storybook-yarn-cache-push - .shared:rules:update-cache stage: prepare script: - - !reference [.storybook-yarn-install, script] + - yarn_install_script .frontend-fixtures-base: extends: @@ -194,7 +186,7 @@ graphql-schema-dump as-if-foss: SETUP_DB: "false" before_script: - !reference [.default-before_script, before_script] - - !reference [.yarn-install, script] + - yarn_install_script stage: test .jest-base: @@ -261,6 +253,7 @@ jest-integration: coverage-frontend: extends: - .default-retry + - .default-utils-before_script - .yarn-cache - .frontend:rules:coverage-frontend needs: @@ -269,9 +262,8 @@ coverage-frontend: - job: "jest minimal" optional: true stage: post-test - before_script: - - !reference [.yarn-install, script] script: + - yarn_install_script - run_timed_command "yarn node scripts/frontend/merge_coverage_frontend.js" # Removing the individual coverage results, as we just merged them. - if ls coverage-frontend/jest-* > /dev/null 2>&1; then @@ -291,12 +283,13 @@ coverage-frontend: .qa-frontend-node: extends: - .default-retry + - .default-utils-before_script - .qa-frontend-node-cache - .frontend:rules:qa-frontend-node stage: test needs: [] script: - - !reference [.yarn-install, script] + - yarn_install_script - run_timed_command "retry yarn run webpack-prod" qa-frontend-node:14: @@ -316,6 +309,7 @@ qa-frontend-node:latest: webpack-dev-server: extends: - .default-retry + - .default-utils-before_script - .yarn-cache - .frontend:rules:default-frontend-jobs stage: test @@ -324,7 +318,7 @@ webpack-dev-server: WEBPACK_MEMORY_TEST: "true" WEBPACK_VENDOR_DLL: "true" script: - - !reference [.yarn-install, script] + - yarn_install_script - run_timed_command "retry yarn webpack-vendor" - run_timed_command "node --expose-gc node_modules/.bin/webpack-dev-server --config config/webpack.config.js" artifacts: @@ -336,13 +330,14 @@ webpack-dev-server: bundle-size-review: extends: - .default-retry + - .default-utils-before_script - .assets-compile-cache - .frontend:rules:bundle-size-review image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:danger stage: test needs: [] script: - - !reference [.yarn-install, script] + - yarn_install_script - scripts/bundle_size_review artifacts: when: always @@ -380,8 +375,8 @@ startup-css-check as-if-foss: - .frontend-test-base - .storybook-yarn-cache script: - - !reference [.storybook-yarn-install, script] - - yarn run storybook:build + - run_timed_command "retry yarn run storybook:install --frozen-lockfile" + - run_timed_command "yarn run storybook:build" needs: ["graphql-schema-dump"] compile-storybook: diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index 9be5eb7bcd7..ed59a0dd8fe 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -8,13 +8,17 @@ - job_execution_timeout - stuck_or_timeout_failure -.default-before_script: +.default-utils-before_script: before_script: - echo $FOSS_ONLY - '[ "$FOSS_ONLY" = "1" ] && rm -rf ee/ qa/spec/ee/ qa/qa/specs/features/ee/ qa/qa/ee/ qa/qa/ee.rb' - export GOPATH=$CI_PROJECT_DIR/.go - mkdir -p $GOPATH - source scripts/utils.sh + +.default-before_script: + before_script: + - !reference [.default-utils-before_script, before_script] - source scripts/prepare_build.sh .ruby-gems-cache: &ruby-gems-cache -- cgit v1.2.3