diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index 7cec66e2408..18cb4ba3d7f 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -47,10 +47,15 @@ docs-lint markdown: needs: [] script: - source ./scripts/utils.sh - - yarn_install_script - - install_gitlab_gem - - scripts/lint-doc.sh - - scripts/lint/check_mermaid.mjs + - | + function docs_lint_markdown() { + yarn_install_script + install_gitlab_gem + scripts/lint-doc.sh + scripts/lint/check_mermaid.mjs + } + + run_with_custom_exit_code docs_lint_markdown docs code_quality: extends: @@ -97,8 +102,10 @@ docs-lint links: - .docs-markdown-lint-image stage: lint needs: [] + before_script: + - source scripts/utils.sh script: - - lychee --offline --no-progress --include-fragments doc + - run_with_custom_exit_code lychee --offline --no-progress --include-fragments doc docs-lint deprecations-and-removals: variables: @@ -111,8 +118,13 @@ docs-lint deprecations-and-removals: stage: lint needs: [] script: - - bundle exec rake gitlab:docs:check_deprecations - - bundle exec rake gitlab:docs:check_windows + - | + function docs_lint_deprecations_and_removals() { + bundle exec rake gitlab:docs:check_deprecations + bundle exec rake gitlab:docs:check_windows + } + + run_with_custom_exit_code docs_lint_deprecations_and_removals docs-lint redirects: image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-alpine @@ -121,5 +133,7 @@ docs-lint redirects: - .default-retry - .docs:rules:redirect-check needs: [] + before_script: + - source scripts/utils.sh script: - - ./scripts/lint-docs-redirects.rb + - run_with_custom_exit_code ./scripts/lint-docs-redirects.rb diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 770e50c7c67..fcf40a5a61c 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -334,7 +334,7 @@ jest: junit: junit_jest.xml parallel: 11 script: - - run_timed_command scripts/frontend/jest_ci.js + - run_with_custom_exit_code run_timed_command scripts/frontend/jest_ci.js jest-with-fixtures: extends: @@ -348,7 +348,7 @@ jest-with-fixtures: - !reference [.with-fixtures-needs, needs] parallel: 2 script: - - run_timed_command "scripts/frontend/jest_ci.js --fixtures" + - run_with_custom_exit_code run_timed_command "scripts/frontend/jest_ci.js --fixtures" jest vue3: extends: @@ -388,7 +388,7 @@ jest vue3 mr: - junit_jest.xml parallel: 6 script: - - run_timed_command "scripts/frontend/jest_ci.js --vue3" + - run_with_custom_exit_code run_timed_command "scripts/frontend/jest_ci.js --vue3" allow_failure: false jest-with-fixtures vue3 mr: @@ -408,7 +408,7 @@ jest-with-fixtures vue3 mr: - junit_jest.xml parallel: 1 script: - - run_timed_command "scripts/frontend/jest_ci.js --vue3 --fixtures" + - run_with_custom_exit_code run_timed_command "scripts/frontend/jest_ci.js --vue3 --fixtures" jest predictive: extends: @@ -418,7 +418,15 @@ jest predictive: - !reference [jest, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "scripts/frontend/jest_ci.js --predictive"; fi + - | + function jest_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "scripts/frontend/jest_ci.js --predictive" + fi + } + + run_with_custom_exit_code jest_predictive + parallel: 4 jest-with-fixtures predictive: @@ -429,7 +437,14 @@ jest-with-fixtures predictive: - !reference [jest-with-fixtures, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "scripts/frontend/jest_ci.js --predictive --fixtures"; fi + - | + function jest_with_fixtures_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "scripts/frontend/jest_ci.js --predictive --fixtures" + fi + } + + run_with_custom_exit_code jest_with_fixtures_predictive jest vue3 predictive: extends: @@ -439,7 +454,14 @@ jest vue3 predictive: - !reference [jest vue3 mr, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "scripts/frontend/jest_ci.js --vue3 --predictive"; fi + - | + function jest_vue3_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "scripts/frontend/jest_ci.js --vue3 --predictive" + fi + } + + run_with_custom_exit_code jest_vue3_predictive jest-with-fixtures vue3 predictive: extends: @@ -449,7 +471,14 @@ jest-with-fixtures vue3 predictive: - !reference [jest-with-fixtures vue3 mr, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "scripts/frontend/jest_ci.js --vue3 --predictive --fixtures"; fi + - | + function jest_with_fixtures_vue3_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "scripts/frontend/jest_ci.js --vue3 --predictive --fixtures"; + fi + } + + run_with_custom_exit_code jest_with_fixtures_vue3_predictive allow_failure: false jest vue3 check quarantined predictive: @@ -460,7 +489,14 @@ jest vue3 check quarantined predictive: - !reference [jest vue3 mr, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "./scripts/frontend/check_jest_vue3_quarantine.js"; fi + - | + function jest_vue_check_quarantined_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "./scripts/frontend/check_jest_vue3_quarantine.js" + fi + } + + run_with_custom_exit_code jest_vue_check_quarantined_predictive parallel: 4 artifacts: name: quarantined_tests_output @@ -483,7 +519,14 @@ jest vue3 check quarantined: - .frontend:rules:jest-vue3-check-quarantined parallel: 4 script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "./scripts/frontend/check_jest_vue3_quarantine.js --all"; fi + - | + function jest_vue3_check_quarantined() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "./scripts/frontend/check_jest_vue3_quarantine.js --all" + fi + } + + run_with_custom_exit_code jest_vue3_check_quarantined jest-with-fixtures vue3 check quarantined: extends: @@ -498,7 +541,7 @@ jest-integration: - .repo-from-artifacts - .frontend:rules:jest-integration script: - - run_timed_command "yarn jest:integration --ci" + - run_with_custom_exit_code run_timed_command "yarn jest:integration --ci" needs: # it's ok to wait for the repo artifact as we're waiting for the fixtures (which wait for the repo artifact) anyway - !reference [.repo-from-artifacts, needs] @@ -550,7 +593,7 @@ jest-linters: - .frontend:rules:jest-linters needs: [] script: - - run_timed_command "yarn jest:eslint --ci" + - run_with_custom_exit_code run_timed_command "yarn jest:eslint --ci" coverage-frontend: extends: diff --git a/app/assets/javascripts/credentials/components/credentials_filter_sort_app.vue b/app/assets/javascripts/credentials/components/credentials_filter_sort_app.vue index a1c5979ffe1..f4904e51209 100644 --- a/app/assets/javascripts/credentials/components/credentials_filter_sort_app.vue +++ b/app/assets/javascripts/credentials/components/credentials_filter_sort_app.vue @@ -56,6 +56,7 @@ export default {