mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +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
|
## 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.
|
# 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.
|
# Runs on every MR pipeline (including bot commits); does not require auto-translate labels.
|
||||||
check_auto_translate_commit_history:
|
check_auto_translate_commit_history:
|
||||||
stage: auto_translate
|
stage: pre_check
|
||||||
image: python:3.11
|
image: python:3.11
|
||||||
tags: [fast_run, shiny]
|
tags: [fast_run, shiny]
|
||||||
rules:
|
rules:
|
||||||
@@ -94,14 +94,8 @@ translate:
|
|||||||
- *auto_translate_setup
|
- *auto_translate_setup
|
||||||
- git checkout $CI_COMMIT_REF_NAME
|
- git checkout $CI_COMMIT_REF_NAME
|
||||||
- |
|
- |
|
||||||
if [ -n "$TRANS_FILE" ]; then
|
python3 tools/ci/doc_auto_translate.py run --repo-root "$CI_PROJECT_DIR" \
|
||||||
echo "TRANS_FILE override: incremental translate only for listed paths"
|
--mode all --guard-labels auto-translate::full
|
||||||
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
|
|
||||||
|
|
||||||
# Label: auto-translate::incremental — line check + incremental translate only (no entire/full bucket).
|
# Label: auto-translate::incremental — line check + incremental translate only (no entire/full bucket).
|
||||||
translate_incremental:
|
translate_incremental:
|
||||||
@@ -124,11 +118,5 @@ translate_incremental:
|
|||||||
- *auto_translate_setup
|
- *auto_translate_setup
|
||||||
- git checkout $CI_COMMIT_REF_NAME
|
- git checkout $CI_COMMIT_REF_NAME
|
||||||
- |
|
- |
|
||||||
if [ -n "$TRANS_FILE" ]; then
|
python3 tools/ci/doc_auto_translate.py run --repo-root "$CI_PROJECT_DIR" \
|
||||||
echo "TRANS_FILE override: incremental translate only for listed paths"
|
--mode incremental-only --guard-labels auto-translate::incremental
|
||||||
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
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
#####################
|
#####################
|
||||||
stages:
|
stages:
|
||||||
- manual_gate
|
- manual_gate
|
||||||
- auto_translate
|
|
||||||
- upload_cache
|
- upload_cache
|
||||||
- pre_check
|
- pre_check
|
||||||
|
- auto_translate
|
||||||
- build
|
- build
|
||||||
- assign_test
|
- assign_test
|
||||||
- build_doc
|
- build_doc
|
||||||
|
|||||||
Reference in New Issue
Block a user