From 5d29851c9cbea6cfc268457fe623fcac7eae2c8b Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Wed, 11 Dec 2024 17:48:02 +0800 Subject: [PATCH] ci(docs): revert d98e77a4a7 to simplify CI --- .gitlab/ci/common.yml | 2 +- .gitlab/ci/docs.yml | 65 ++++++++----------------------------------- 2 files changed, 13 insertions(+), 54 deletions(-) diff --git a/.gitlab/ci/common.yml b/.gitlab/ci/common.yml index ada3b5b12a..f790d64140 100644 --- a/.gitlab/ci/common.yml +++ b/.gitlab/ci/common.yml @@ -6,9 +6,9 @@ stages: - pre_check - build - assign_test + - build_doc - target_test - host_test - - build_doc - test_deploy - deploy - post_deploy diff --git a/.gitlab/ci/docs.yml b/.gitlab/ci/docs.yml index 6e77737a36..47f7b6778f 100644 --- a/.gitlab/ci/docs.yml +++ b/.gitlab/ci/docs.yml @@ -37,25 +37,16 @@ .if-dev-push: &if-dev-push if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")' -.if-schedule: &if-schedule - if: '$CI_PIPELINE_SOURCE == "schedule"' - .doc-rules:build:docs-full: rules: - <<: *if-qa-test-tag when: never - - <<: *if-schedule + - <<: *if-protected - <<: *if-label-build_docs - <<: *if-label-docs_full - <<: *if-dev-push changes: *patterns-docs-full -.doc-rules:build:docs-full-prod: - rules: - - <<: *if-qa-test-tag - when: never - - <<: *if-protected-no_label - .doc-rules:build:docs-partial: rules: - <<: *if-qa-test-tag @@ -92,6 +83,10 @@ check_docs_lang_sync: stage: build_doc tags: - build_docs + needs: + - job: fast_template_app + artifacts: false + optional: true script: - if [ -n "${BREATHE_ALT_INSTALL_URL}" ]; then pip uninstall -y breathe && pip install -U ${BREATHE_ALT_INSTALL_URL}; fi - cd docs @@ -116,24 +111,6 @@ build_docs_html_full: extends: - .build_docs_template - .doc-rules:build:docs-full - needs: - - job: fast_template_app - artifacts: false - optional: true - artifacts: - when: always - paths: - - docs/_build/*/*/*.txt - - docs/_build/*/*/html/* - expire_in: 4 days - variables: - DOC_BUILDERS: "html" - -build_docs_html_full_prod: - extends: - - .build_docs_template - - .doc-rules:build:docs-full-prod - dependencies: [] # Stop build_docs jobs from downloading all previous job's artifacts artifacts: when: always paths: @@ -147,10 +124,6 @@ build_docs_html_partial: extends: - .build_docs_template - .doc-rules:build:docs-partial - needs: - - job: fast_template_app - artifacts: false - optional: true artifacts: when: always paths: @@ -170,28 +143,12 @@ build_docs_pdf: extends: - .build_docs_template - .doc-rules:build:docs-full - needs: - - job: fast_template_app - artifacts: false - optional: true - artifacts: - when: always - paths: - - docs/_build/*/*/latex/* - expire_in: 4 days - variables: - DOC_BUILDERS: "latex" - -build_docs_pdf_prod: - extends: - - .build_docs_template - - .doc-rules:build:docs-full-prod - dependencies: [] # Stop build_docs jobs from downloading all previous job's artifacts artifacts: when: always paths: - docs/_build/*/*/latex/* expire_in: 4 days + allow_failure: true # TODO IDFCI-2216 variables: DOC_BUILDERS: "latex" @@ -239,12 +196,13 @@ deploy_docs_production: # The DOCS_PROD_* variables used by this job are "Protected" so these branches must all be marked "Protected" in Gitlab settings extends: - .deploy_docs_template - - .doc-rules:build:docs-full-prod + rules: + - <<: *if-protected-no_label stage: post_deploy dependencies: # set dependencies to null to avoid missing artifacts issue needs: # ensure runs after push_to_github succeeded - - build_docs_html_full_prod - - build_docs_pdf_prod + - build_docs_html_full + - build_docs_pdf - job: push_to_github artifacts: false variables: @@ -259,7 +217,8 @@ deploy_docs_production: check_doc_links: extends: - .build_docs_template - - .doc-rules:build:docs-full-prod + rules: + - <<: *if-protected-no_label stage: post_deploy needs: - job: deploy_docs_production