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

Update cache-assets-base to use custom exit code

Source gitlab_component_helpers before calling function

Remove single quote
上级 8cd51982
No related branches found
No related tags found
无相关合并请求
......@@ -9,12 +9,18 @@ cache-workhorse:
variables:
SETUP_DB: "false"
script:
- source scripts/gitlab_component_helpers.sh
- 'gitlab_workhorse_archive_doesnt_exist || { echoinfo "INFO: Exiting early as package exists."; exit 0; }'
- run_timed_command "scripts/setup-test-env"
- run_timed_command "select_gitlab_workhorse_essentials"
- run_timed_command "create_gitlab_workhorse_package"
- run_timed_command "upload_gitlab_workhorse_package"
- |
function cache_workhorse() {
source scripts/gitlab_component_helpers.sh
gitlab_workhorse_archive_doesnt_exist || { echoinfo "INFO: Exiting early as package exists."; exit 0; }
run_timed_command "scripts/setup-test-env"
run_timed_command "select_gitlab_workhorse_essentials"
run_timed_command "create_gitlab_workhorse_package"
run_timed_command "upload_gitlab_workhorse_package"
}
run_with_custom_exit_code cache_workhorse
artifacts:
expire_in: 7d
paths:
......@@ -29,14 +35,19 @@ cache-workhorse:
variables:
WEBPACK_REPORT: "false"
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; }'
- assets_compile_script
- echo -n "${GITLAB_ASSETS_HASH}" > "cached-assets-hash.txt"
- run_timed_command "create_gitlab_assets_package"
- run_timed_command "upload_gitlab_assets_package"
- |
function cache_assets() {
yarn_install_script
source scripts/gitlab_component_helpers.sh
export GITLAB_ASSETS_HASH=$(bundle exec rake gitlab:assets:hash_sum)
gitlab_assets_archive_doesnt_exist || { echoinfo "INFO: Exiting early as package exists."; exit 0; }
assets_compile_script
echo -n "${GITLAB_ASSETS_HASH}" > "cached-assets-hash.txt"
run_timed_command "create_gitlab_assets_package"
run_timed_command "upload_gitlab_assets_package"
}
run_with_custom_exit_code cache_assets
cache-assets:test:
extends: .cache-assets-base
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册