mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
ci: moved auto_translate stage
This commit is contained in:
@@ -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.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#####################
|
||||
stages:
|
||||
- manual_gate
|
||||
- auto_translate
|
||||
- upload_cache
|
||||
- pre_check
|
||||
- auto_translate
|
||||
- build
|
||||
- assign_test
|
||||
- build_doc
|
||||
|
||||
Reference in New Issue
Block a user