Skip to content
代码片段 群组 项目
未验证 提交 018a3dd8 编辑于 作者: David Dieulivol's avatar David Dieulivol 提交者: GitLab
浏览文件

Merge branch 'jennli-docs-job-exit-code' into 'master'

No related branches found
No related tags found
2 合并请求!3031Merge per-main-jh to main-jh by luzhiyuan,!3030Merge per-main-jh to main-jh
......@@ -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
......@@ -546,9 +546,11 @@ function run_with_custom_exit_code() {
set +e # temporarily disable exit on error to prevent premature exit
# runs command passed in as argument, save standard error and standard output
output=$("$@" 2>&1)
output=$(set -e; "$@" 2>&1)
initial_exit_code=$?
echo "initial_exit_code: $initial_exit_code"
local trace_file="stdout_stderr_log.out"
echo "$output" | tee "$trace_file"
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册