From 5a13aa388646d16bdaba2f214fc4de3521771e7a Mon Sep 17 00:00:00 2001 From: Bruno Bernardo Date: Fri, 23 May 2025 14:03:54 +0200 Subject: [PATCH 1/4] CI: move documentation jobs to other stages - jobs that build elements of the documentation moved to [build] - doc publication in [publishing] - job that tests documentation instructions for python environment installation --- .gitlab/ci/pipelines/before_merging.yml | 13 ++++++------- .gitlab/ci/pipelines/master_branch.yml | 12 ++++++------ .gitlab/ci/pipelines/merge_train.yml | 13 ++++++------- .gitlab/ci/pipelines/schedule_documentation.yml | 12 ++++++------ .gitlab/ci/pipelines/schedule_extended_test.yml | 17 ++++++++--------- ci/bin/code_verification.ml | 4 ++-- ci/bin/common.ml | 12 ++++++------ 7 files changed, 40 insertions(+), 43 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index aa4fa5a68472..4b82f5b3b4b9 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -8,7 +8,6 @@ stages: - build - test - test_coverage -- doc - manual oc.docker:ci:amd64: @@ -4256,7 +4255,7 @@ oc.unified_coverage: oc.install_python_bookworm: image: debian:bookworm - stage: doc + stage: test tags: - gcp rules: @@ -4301,7 +4300,7 @@ oc.install_python_bookworm: documentation:odoc: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -4385,7 +4384,7 @@ documentation:odoc: documentation:manuals: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -4438,7 +4437,7 @@ documentation:manuals: documentation:docgen: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -4520,7 +4519,7 @@ documentation:docgen: documentation:build_all: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -4570,7 +4569,7 @@ documentation:build_all: documentation:linkcheck: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: test tags: - gcp rules: diff --git a/.gitlab/ci/pipelines/master_branch.yml b/.gitlab/ci/pipelines/master_branch.yml index 1b19b2be3ccf..5ab349cceaa7 100644 --- a/.gitlab/ci/pipelines/master_branch.yml +++ b/.gitlab/ci/pipelines/master_branch.yml @@ -6,7 +6,7 @@ stages: - images - build - test_coverage -- doc +- publishing - prepare_release - manual @@ -410,7 +410,7 @@ docker:merge_manifests: documentation:odoc: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -471,7 +471,7 @@ documentation:odoc: documentation:manuals: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -516,7 +516,7 @@ documentation:manuals: documentation:docgen: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -575,7 +575,7 @@ documentation:docgen: documentation:build_all: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -623,7 +623,7 @@ documentation:build_all: publish:documentation: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: publishing tags: - gcp rules: diff --git a/.gitlab/ci/pipelines/merge_train.yml b/.gitlab/ci/pipelines/merge_train.yml index c2617da9b0ec..57b42ee22ef5 100644 --- a/.gitlab/ci/pipelines/merge_train.yml +++ b/.gitlab/ci/pipelines/merge_train.yml @@ -8,7 +8,6 @@ stages: - build - test - test_coverage -- doc - manual oc.docker:ci:amd64: @@ -4255,7 +4254,7 @@ oc.unified_coverage: oc.install_python_bookworm: image: debian:bookworm - stage: doc + stage: test tags: - gcp rules: @@ -4300,7 +4299,7 @@ oc.install_python_bookworm: documentation:odoc: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -4384,7 +4383,7 @@ documentation:odoc: documentation:manuals: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -4437,7 +4436,7 @@ documentation:manuals: documentation:docgen: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -4519,7 +4518,7 @@ documentation:docgen: documentation:build_all: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -4569,7 +4568,7 @@ documentation:build_all: documentation:linkcheck: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: test tags: - gcp rules: diff --git a/.gitlab/ci/pipelines/schedule_documentation.yml b/.gitlab/ci/pipelines/schedule_documentation.yml index 17de8e37d2b5..2a06674bd831 100644 --- a/.gitlab/ci/pipelines/schedule_documentation.yml +++ b/.gitlab/ci/pipelines/schedule_documentation.yml @@ -5,7 +5,7 @@ stages: - start - images - build -- doc +- publishing oc.docker:ci:amd64: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 @@ -97,7 +97,7 @@ oc.build:static-x86_64-linux-binaries: documentation:odoc: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -159,7 +159,7 @@ documentation:odoc: documentation:manuals: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -205,7 +205,7 @@ documentation:manuals: documentation:docgen: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -265,7 +265,7 @@ documentation:docgen: documentation:build_all: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -314,7 +314,7 @@ documentation:build_all: publish:documentation: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: publishing tags: - gcp rules: diff --git a/.gitlab/ci/pipelines/schedule_extended_test.yml b/.gitlab/ci/pipelines/schedule_extended_test.yml index f16cdb8e678e..4bcf5916b1b8 100644 --- a/.gitlab/ci/pipelines/schedule_extended_test.yml +++ b/.gitlab/ci/pipelines/schedule_extended_test.yml @@ -8,7 +8,6 @@ stages: - build - test - packaging -- doc oc.docker:ci:amd64: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 @@ -3442,7 +3441,7 @@ tezt:static-binaries: oc.install_python_noble: image: public.ecr.aws/lts/ubuntu:24.04_stable - stage: doc + stage: test tags: - gcp rules: @@ -3457,7 +3456,7 @@ oc.install_python_noble: oc.install_python_jammy: image: public.ecr.aws/lts/ubuntu:22.04_stable - stage: doc + stage: test tags: - gcp rules: @@ -3472,7 +3471,7 @@ oc.install_python_jammy: oc.install_python_bookworm: image: debian:bookworm - stage: doc + stage: test tags: - gcp rules: @@ -3487,7 +3486,7 @@ oc.install_python_bookworm: documentation:odoc: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -3530,7 +3529,7 @@ documentation:odoc: documentation:manuals: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -3565,7 +3564,7 @@ documentation:manuals: documentation:docgen: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -3606,7 +3605,7 @@ documentation:docgen: documentation:build_all: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: build tags: - gcp rules: @@ -3638,7 +3637,7 @@ documentation:build_all: documentation:linkcheck: image: ${ci_image_name}/test:${ci_image_tag} - stage: doc + stage: test tags: - gcp rules: diff --git a/ci/bin/code_verification.ml b/ci/bin/code_verification.ml index da01a1fa794c..294c387cb04e 100644 --- a/ci/bin/code_verification.ml +++ b/ci/bin/code_verification.ml @@ -1899,7 +1899,7 @@ let jobs pipeline_type = | Schedule_extended_test -> [] in - (*Doc jobs*) + (* Doc jobs *) let doc = let jobs_install_python = (* Creates a job that tests installation of the python environment in [image] *) @@ -1908,7 +1908,7 @@ let jobs pipeline_type = ~__POS__ ~name ~image - ~stage:Stages.doc + ~stage:Stages.test ~dependencies:dependencies_needs_start ~rules: (make_rules diff --git a/ci/bin/common.ml b/ci/bin/common.ml index 907158d28237..98df7017b1ea 100644 --- a/ci/bin/common.ml +++ b/ci/bin/common.ml @@ -1182,7 +1182,7 @@ module Documentation = struct ~__POS__ ~name:"documentation:odoc" ~image:Images.CI.test - ~stage:Stages.doc + ~stage:Stages.build ?dependencies ?rules ~before_script:(before_script ~eval_opam:true []) @@ -1212,7 +1212,7 @@ module Documentation = struct ~__POS__ ~name:"documentation:manuals" ~image:Images.CI.test - ~stage:Stages.doc + ~stage:Stages.build ?dependencies ?rules ~before_script:(before_script ~eval_opam:true []) @@ -1242,7 +1242,7 @@ module Documentation = struct ~__POS__ ~name:"documentation:docgen" ~image:Images.CI.test - ~stage:Stages.doc + ~stage:Stages.build ?dependencies ?rules ~before_script:(before_script ~eval_opam:true []) @@ -1274,7 +1274,7 @@ module Documentation = struct ~__POS__ ~name:"documentation:build_all" ~image:Images.CI.test - ~stage:Stages.doc + ~stage:Stages.build ~dependencies ?rules ~before_script:(before_script ~eval_opam:true ~init_python_venv:true []) @@ -1298,7 +1298,7 @@ module Documentation = struct ~__POS__ ~name:"documentation:linkcheck" ~image:Images.CI.test - ~stage:Stages.doc + ~stage:Stages.test ~dependencies (* Warning: the [documentation:linkcheck] job must have at least the same restrictions in the rules as [documentation:build_all], otherwise the CI @@ -1326,7 +1326,7 @@ module Documentation = struct ~__POS__ ~name:"publish:documentation" ~image:Images.CI.test - ~stage:Stages.doc + ~stage:Stages.publishing ~dependencies ~before_script: (before_script -- GitLab From 6fdabd52be9eaaa58124836702cbdcb393c173f1 Mon Sep 17 00:00:00 2001 From: Bruno Bernardo Date: Fri, 23 May 2025 14:12:32 +0200 Subject: [PATCH 2/4] CIAO/[lib_tezos_ci]: remove [documentation] stage "documentation" should not be a proper CI stage. Usual CI stages are: build, test, deploy. --- ci/lib_tezos_ci/tezos_ci.ml | 2 -- ci/lib_tezos_ci/tezos_ci.mli | 2 -- 2 files changed, 4 deletions(-) diff --git a/ci/lib_tezos_ci/tezos_ci.ml b/ci/lib_tezos_ci/tezos_ci.ml index c5976b99db6e..d41ed90744cf 100644 --- a/ci/lib_tezos_ci/tezos_ci.ml +++ b/ci/lib_tezos_ci/tezos_ci.ml @@ -1295,8 +1295,6 @@ module Stages = struct let publishing_tests = Stage.register "publishing_tests" - let doc = Stage.register "doc" - let scan = Stage.register "scan" let prepare_release = Stage.register "prepare_release" diff --git a/ci/lib_tezos_ci/tezos_ci.mli b/ci/lib_tezos_ci/tezos_ci.mli index 64b055a780d9..35173a473b29 100644 --- a/ci/lib_tezos_ci/tezos_ci.mli +++ b/ci/lib_tezos_ci/tezos_ci.mli @@ -568,8 +568,6 @@ module Stages : sig val publishing_tests : Stage.t - val doc : Stage.t - (* Scanning vulnerabilities of Docker images. *) val scan : Stage.t -- GitLab From 452d18914a4e973f6ab75b52f0b7a09a45e2b806 Mon Sep 17 00:00:00 2001 From: Bruno Bernardo Date: Fri, 23 May 2025 14:16:18 +0200 Subject: [PATCH 3/4] CI: rename [oc.install_python_] into [documentation.install_python_] These jobs are now related to the documentation since we don't use python in our test suite anymore. --- .gitlab/ci/pipelines/before_merging.yml | 2 +- .gitlab/ci/pipelines/merge_train.yml | 2 +- .gitlab/ci/pipelines/schedule_extended_test.yml | 6 +++--- ci/bin/code_verification.ml | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 4b82f5b3b4b9..d66dfbb878d2 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -4253,7 +4253,7 @@ oc.unified_coverage: expose_as: Coverage report coverage: '/Coverage: ([^%]+%)/' -oc.install_python_bookworm: +documentation:install_python_bookworm: image: debian:bookworm stage: test tags: diff --git a/.gitlab/ci/pipelines/merge_train.yml b/.gitlab/ci/pipelines/merge_train.yml index 57b42ee22ef5..2b409264891b 100644 --- a/.gitlab/ci/pipelines/merge_train.yml +++ b/.gitlab/ci/pipelines/merge_train.yml @@ -4252,7 +4252,7 @@ oc.unified_coverage: expose_as: Coverage report coverage: '/Coverage: ([^%]+%)/' -oc.install_python_bookworm: +documentation:install_python_bookworm: image: debian:bookworm stage: test tags: diff --git a/.gitlab/ci/pipelines/schedule_extended_test.yml b/.gitlab/ci/pipelines/schedule_extended_test.yml index 4bcf5916b1b8..acefb51730f3 100644 --- a/.gitlab/ci/pipelines/schedule_extended_test.yml +++ b/.gitlab/ci/pipelines/schedule_extended_test.yml @@ -3439,7 +3439,7 @@ tezt:static-binaries: junit: $JUNIT when: always -oc.install_python_noble: +documentation:install_python_noble: image: public.ecr.aws/lts/ubuntu:24.04_stable stage: test tags: @@ -3454,7 +3454,7 @@ oc.install_python_noble: script: - ./docs/developer/install-python-debian-ubuntu.sh tezos/tezos master -oc.install_python_jammy: +documentation:install_python_jammy: image: public.ecr.aws/lts/ubuntu:22.04_stable stage: test tags: @@ -3469,7 +3469,7 @@ oc.install_python_jammy: script: - ./docs/developer/install-python-debian-ubuntu.sh tezos/tezos master -oc.install_python_bookworm: +documentation:install_python_bookworm: image: debian:bookworm stage: test tags: diff --git a/ci/bin/code_verification.ml b/ci/bin/code_verification.ml index 294c387cb04e..68c7f449458a 100644 --- a/ci/bin/code_verification.ml +++ b/ci/bin/code_verification.ml @@ -1937,19 +1937,19 @@ let jobs pipeline_type = [ job_install_python ~__POS__ - ~name:"oc.install_python_noble" + ~name:"documentation:install_python_noble" ~image:Images.ubuntu_noble ~project:"tezos/tezos" ~branch:"master"; job_install_python ~__POS__ - ~name:"oc.install_python_jammy" + ~name:"documentation:install_python_jammy" ~image:Images.ubuntu_jammy ~project:"tezos/tezos" ~branch:"master"; job_install_python ~__POS__ - ~name:"oc.install_python_bookworm" + ~name:"documentation:install_python_bookworm" ~image:Images.debian_bookworm ~project:"tezos/tezos" ~branch:"master"; @@ -1958,7 +1958,7 @@ let jobs pipeline_type = [ job_install_python ~__POS__ - ~name:"oc.install_python_bookworm" + ~name:"documentation:install_python_bookworm" ~image:Images.debian_bookworm ~project:"${CI_MERGE_REQUEST_SOURCE_PROJECT_PATH:-tezos/tezos}" ~branch:"${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-master}"; -- GitLab From 03e7370117ab3620233f420bce9797240b90b452 Mon Sep 17 00:00:00 2001 From: Bruno Bernardo Date: Fri, 23 May 2025 14:20:55 +0200 Subject: [PATCH 4/4] CI: [publish:documentation] -> [documentation:publish] For consistency with other documentation jobs. --- .gitlab/ci/pipelines/master_branch.yml | 2 +- .gitlab/ci/pipelines/schedule_documentation.yml | 2 +- ci/bin/common.ml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/pipelines/master_branch.yml b/.gitlab/ci/pipelines/master_branch.yml index 5ab349cceaa7..c0035c36f453 100644 --- a/.gitlab/ci/pipelines/master_branch.yml +++ b/.gitlab/ci/pipelines/master_branch.yml @@ -621,7 +621,7 @@ documentation:build_all: - docs/_build/ expose_as: Documentation - excluding old protocols -publish:documentation: +documentation:publish: image: ${ci_image_name}/test:${ci_image_tag} stage: publishing tags: diff --git a/.gitlab/ci/pipelines/schedule_documentation.yml b/.gitlab/ci/pipelines/schedule_documentation.yml index 2a06674bd831..dde90399b815 100644 --- a/.gitlab/ci/pipelines/schedule_documentation.yml +++ b/.gitlab/ci/pipelines/schedule_documentation.yml @@ -312,7 +312,7 @@ documentation:build_all: - docs/_build/ expose_as: Documentation - excluding old protocols -publish:documentation: +documentation:publish: image: ${ci_image_name}/test:${ci_image_tag} stage: publishing tags: diff --git a/ci/bin/common.ml b/ci/bin/common.ml index 98df7017b1ea..63c2beb8c6a7 100644 --- a/ci/bin/common.ml +++ b/ci/bin/common.ml @@ -1324,7 +1324,7 @@ module Documentation = struct let dependencies = mk_artifact_dependencies ?dependencies [job_build_all] in job ~__POS__ - ~name:"publish:documentation" + ~name:"documentation:publish" ~image:Images.CI.test ~stage:Stages.publishing ~dependencies -- GitLab