Skip to content
代码片段 群组 项目
提交 d9bf9d1b 编辑于 作者: Jennifer Li's avatar Jennifer Li
浏览文件

Merge branch 'print-when-fixtures-cannot-be-reused' into 'master'

ci: Add info message about reusing frontend fixtures

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118734



Merged-by: default avatarJennifer Li <jli@gitlab.com>
Approved-by: default avatarJennifer Li <jli@gitlab.com>
Co-authored-by: default avatarRémy Coutable <remy@rymai.me>
No related branches found
No related tags found
无相关合并请求
...@@ -141,9 +141,8 @@ retrieve-frontend-fixtures: ...@@ -141,9 +141,8 @@ retrieve-frontend-fixtures:
- source scripts/gitlab_component_helpers.sh - source scripts/gitlab_component_helpers.sh
- | - |
if check_fixtures_reuse; then if check_fixtures_reuse; then
echoinfo "INFO: Reusing frontend fixtures from 'retrieve-frontend-fixtures'."
exit 0 exit 0
else
echo "No frontend fixtures directory, generating frontend fixtures."
fi fi
- run_timed_command "gem install knapsack --no-document" - run_timed_command "gem install knapsack --no-document"
- section_start "gitaly-test-spawn" "Spawning Gitaly"; scripts/gitaly-test-spawn; section_end "gitaly-test-spawn"; # Do not use 'bundle exec' here - section_start "gitaly-test-spawn" "Spawning Gitaly"; scripts/gitaly-test-spawn; section_end "gitaly-test-spawn"; # Do not use 'bundle exec' here
......
...@@ -106,12 +106,12 @@ function upload_gitlab_assets_package() { ...@@ -106,12 +106,12 @@ function upload_gitlab_assets_package() {
# Fixtures functions # Fixtures functions
function check_fixtures_download() { function check_fixtures_download() {
if [[ "${REUSE_FRONTEND_FIXTURES_ENABLED:-}" != "true" ]]; then if [[ "${REUSE_FRONTEND_FIXTURES_ENABLED:-}" != "true" ]]; then
echoinfo "INFO: Reusing frontend fixtures is disabled due to REUSE_FRONTEND_FIXTURES_ENABLED=${REUSE_FRONTEND_FIXTURES_ENABLED}."
return 1 return 1
fi fi
# Note: Currently, reusing frontend fixtures is only supported in EE.
# Other projects will be supported through this issue in the future: https://gitlab.com/gitlab-org/gitlab/-/issues/393615.
if [[ "${CI_PROJECT_NAME}" != "gitlab" ]] || [[ "${CI_JOB_NAME}" =~ "foss" ]]; then if [[ "${CI_PROJECT_NAME}" != "gitlab" ]] || [[ "${CI_JOB_NAME}" =~ "foss" ]]; then
echoinfo "INFO: Reusing frontend fixtures is only supported in EE."
return 1 return 1
fi fi
...@@ -128,13 +128,13 @@ function check_fixtures_download() { ...@@ -128,13 +128,13 @@ function check_fixtures_download() {
function check_fixtures_reuse() { function check_fixtures_reuse() {
if [[ "${REUSE_FRONTEND_FIXTURES_ENABLED:-}" != "true" ]]; then if [[ "${REUSE_FRONTEND_FIXTURES_ENABLED:-}" != "true" ]]; then
echoinfo "INFO: Reusing frontend fixtures is disabled due to REUSE_FRONTEND_FIXTURES_ENABLED=${REUSE_FRONTEND_FIXTURES_ENABLED}."
rm -rf "tmp/tests/frontend"; rm -rf "tmp/tests/frontend";
return 1 return 1
fi fi
# Note: Currently, reusing frontend fixtures is only supported in EE.
# Other projects will be supported through this issue in the future: https://gitlab.com/gitlab-org/gitlab/-/issues/393615.
if [[ "${CI_PROJECT_NAME}" != "gitlab" ]] || [[ "${CI_JOB_NAME}" =~ "foss" ]]; then if [[ "${CI_PROJECT_NAME}" != "gitlab" ]] || [[ "${CI_JOB_NAME}" =~ "foss" ]]; then
echoinfo "INFO: Reusing frontend fixtures is only supported in EE."
rm -rf "tmp/tests/frontend"; rm -rf "tmp/tests/frontend";
return 1 return 1
fi fi
...@@ -143,11 +143,12 @@ function check_fixtures_reuse() { ...@@ -143,11 +143,12 @@ function check_fixtures_reuse() {
# Remove tmp/tests/frontend/ except on the first parallelized job so that depending # Remove tmp/tests/frontend/ except on the first parallelized job so that depending
# jobs don't download the exact same artifact multiple times. # jobs don't download the exact same artifact multiple times.
if [[ -n "${CI_NODE_INDEX:-}" ]] && [[ "${CI_NODE_INDEX}" -ne 1 ]]; then if [[ -n "${CI_NODE_INDEX:-}" ]] && [[ "${CI_NODE_INDEX}" -ne 1 ]]; then
echoinfo "INFO: Removing 'tmp/tests/frontend' as we're on node ${CI_NODE_INDEX}."; echoinfo "INFO: Removing 'tmp/tests/frontend' as we're on node ${CI_NODE_INDEX}. Dependent jobs will use the artifacts from the first parallelized job.";
rm -rf "tmp/tests/frontend"; rm -rf "tmp/tests/frontend";
fi fi
return 0 return 0
else else
echoinfo "INFO: 'tmp/tests/frontend' does not exist.";
return 1 return 1
fi fi
} }
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册