From 5d73bec7cb9eeea39633cc351d6da90df483d649 Mon Sep 17 00:00:00 2001 From: "igor.udot" Date: Thu, 25 Jun 2026 15:01:36 +0800 Subject: [PATCH] ci: moved auto_translate stage --- .gitlab/ci/README_auto_translate.md | 2 +- .gitlab/ci/auto_trans.yml | 22 +++++----------------- .gitlab/ci/common.yml | 2 +- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/.gitlab/ci/README_auto_translate.md b/.gitlab/ci/README_auto_translate.md index 811b7dd344d..98facde6b67 100644 --- a/.gitlab/ci/README_auto_translate.md +++ b/.gitlab/ci/README_auto_translate.md @@ -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. --- diff --git a/.gitlab/ci/auto_trans.yml b/.gitlab/ci/auto_trans.yml index de055e52c79..0eff00ca61f 100644 --- a/.gitlab/ci/auto_trans.yml +++ b/.gitlab/ci/auto_trans.yml @@ -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 diff --git a/.gitlab/ci/common.yml b/.gitlab/ci/common.yml index ac76ea2a7a8..49e2de49722 100644 --- a/.gitlab/ci/common.yml +++ b/.gitlab/ci/common.yml @@ -3,9 +3,9 @@ ##################### stages: - manual_gate - - auto_translate - upload_cache - pre_check + - auto_translate - build - assign_test - build_doc