ci: moved auto_translate stage

This commit is contained in:
igor.udot
2026-06-26 10:04:51 +08:00
parent c2e931b1b1
commit 5d73bec7cb
3 changed files with 7 additions and 19 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ Translation jobs push bot commits back to the MR branch. Two mechanisms prevent
## Commit history check
`check_auto_translate_commit_history` runs on **every MR pipeline** in the `auto_translate` stage (before `check_line_num` and translation). It does not require auto-translate labels and is not skipped on bot commits, so the bot-push pipeline fails if translation left more than one `auto translation ...` commit on the branch. Squash or rebase to at most one bot commit before re-running translation.
`check_auto_translate_commit_history` runs on **every MR pipeline** (before `check_line_num` and translation). It does not require auto-translate labels and is not skipped on bot commits, so the bot-push pipeline fails if translation left more than one `auto translation ...` commit on the branch. Squash or rebase to at most one bot commit before re-running translation.
---
+5 -17
View File
@@ -26,7 +26,7 @@
# Fail if the MR branch has more than one auto-translation bot commit.
# Runs on every MR pipeline (including bot commits); does not require auto-translate labels.
check_auto_translate_commit_history:
stage: auto_translate
stage: pre_check
image: python:3.11
tags: [fast_run, shiny]
rules:
@@ -94,14 +94,8 @@ translate:
- *auto_translate_setup
- git checkout $CI_COMMIT_REF_NAME
- |
if [ -n "$TRANS_FILE" ]; then
echo "TRANS_FILE override: incremental translate only for listed paths"
python3 tools/ci/doc_auto_translate.py run --repo-root "$CI_PROJECT_DIR" \
--mode incremental-only --trans-file "$TRANS_FILE" --guard-labels auto-translate::full
else
python3 tools/ci/doc_auto_translate.py run --repo-root "$CI_PROJECT_DIR" \
--mode all --guard-labels auto-translate::full
fi
python3 tools/ci/doc_auto_translate.py run --repo-root "$CI_PROJECT_DIR" \
--mode all --guard-labels auto-translate::full
# Label: auto-translate::incremental — line check + incremental translate only (no entire/full bucket).
translate_incremental:
@@ -124,11 +118,5 @@ translate_incremental:
- *auto_translate_setup
- git checkout $CI_COMMIT_REF_NAME
- |
if [ -n "$TRANS_FILE" ]; then
echo "TRANS_FILE override: incremental translate only for listed paths"
python3 tools/ci/doc_auto_translate.py run --repo-root "$CI_PROJECT_DIR" \
--mode incremental-only --trans-file "$TRANS_FILE" --guard-labels auto-translate::incremental
else
python3 tools/ci/doc_auto_translate.py run --repo-root "$CI_PROJECT_DIR" \
--mode incremental-only --guard-labels auto-translate::incremental
fi
python3 tools/ci/doc_auto_translate.py run --repo-root "$CI_PROJECT_DIR" \
--mode incremental-only --guard-labels auto-translate::incremental
+1 -1
View File
@@ -3,9 +3,9 @@
#####################
stages:
- manual_gate
- auto_translate
- upload_cache
- pre_check
- auto_translate
- build
- assign_test
- build_doc