From 07b32035aa11e607506865c8ecd422c4d4196b07 Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Thu, 11 Jun 2026 09:10:25 +0200 Subject: [PATCH 1/4] Add cd extension --- doc/changes/unreleased.md | 5 +++++ doc/user_guide/features/github_workflows/index.rst | 9 ++++++--- exasol/toolbox/config.py | 2 ++ exasol/toolbox/templates/github/workflows/cd.yml | 8 ++++++++ test/unit/config_test.py | 6 +++++- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index fb4737052..1f3b22041 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -1,3 +1,8 @@ # Unreleased ## Summary + + +## Feature + +* #730: Added workflow extensions to `cd` diff --git a/doc/user_guide/features/github_workflows/index.rst b/doc/user_guide/features/github_workflows/index.rst index 0e699d9a8..439d039f4 100644 --- a/doc/user_guide/features/github_workflows/index.rst +++ b/doc/user_guide/features/github_workflows/index.rst @@ -56,9 +56,8 @@ Maintained by the PTB - Packages the distribution and publishes it to PyPi and GitHub. * - ``cd.yml`` - Push with new tag - - Manages continuous delivery by calling ``check-release-tag.yml``, - ``build-and-publish.yml``, and ``gh-pages.yml``. See :ref:`cd_yml` - for a graph of workflow calls. + - Manages continuous delivery by creating and uploading build artifacts and + documentation. See :ref:`cd_yml` for a graph of workflow calls. * - ``check-release-tag.yml`` - Workflow call - Verifies that the release tag matches the project's internal versioning. @@ -148,6 +147,9 @@ and is maintained by the PTB and what is project-specific. * - ``fast-tests-extension.yml`` - Workflow call - This extends the ``fast-tests.yml`` and should include additional fast tests. + * - ``cd-extension.yml`` + - Workflow call + - This extends the ``cd.yml``. Use it to add project-specific release steps. * - ``merge-gate-extension.yml`` - Workflow call - This extends the ``merge-gate.yml`` and the ``needs`` criteria of the job @@ -260,6 +262,7 @@ to main. This starts the release process by activating the ``cd.yml`` workflow. graph TD %% Workflow Triggers (Solid Lines) cd[cd.yml] --> check-release-tag[check-release-tag.yml] + cd --> cd-extension[cd-extension.yml] %% Dependencies / Waiting (Dotted Lines) check-release-tag -.->|needs| build-and-publish[build-and-publish.yml] diff --git a/exasol/toolbox/config.py b/exasol/toolbox/config.py index 16370a65f..280f8648e 100644 --- a/exasol/toolbox/config.py +++ b/exasol/toolbox/config.py @@ -302,6 +302,7 @@ def github_template_dict(self) -> dict[str, Any]: fast_tests_extension = ( self.github_workflow_directory / "fast-tests-extension.yml" ) + cd_extension = self.github_workflow_directory / "cd-extension.yml" merge_gate_extension = ( self.github_workflow_directory / "merge-gate-extension.yml" ) @@ -315,6 +316,7 @@ def github_template_dict(self) -> dict[str, Any]: "workflow_header": f"{WORKFLOW_HEADER_PREFIX}{__version__}.", "workflow_extension": { "fast_tests": fast_tests_extension.is_file(), + "cd": cd_extension.is_file(), "merge_gate": merge_gate_extension.is_file(), }, } diff --git a/exasol/toolbox/templates/github/workflows/cd.yml b/exasol/toolbox/templates/github/workflows/cd.yml index 53c1e332c..821c4974f 100644 --- a/exasol/toolbox/templates/github/workflows/cd.yml +++ b/exasol/toolbox/templates/github/workflows/cd.yml @@ -24,6 +24,14 @@ jobs: secrets: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + (% if workflow_extension.cd %) + cd-extension: + uses: ./.github/workflows/cd-extension.yml + secrets: inherit + permissions: + contents: write + (% endif %) + publish-docs: needs: - build-and-publish diff --git a/test/unit/config_test.py b/test/unit/config_test.py index 770c6c2a3..9f1555471 100644 --- a/test/unit/config_test.py +++ b/test/unit/config_test.py @@ -59,7 +59,11 @@ def test_works_as_defined(tmp_path, test_project_config_factory): "3.13", "3.14", ), - "workflow_extension": {"fast_tests": False, "merge_gate": False}, + "workflow_extension": { + "fast_tests": False, + "cd": False, + "merge_gate": False, + }, }, "minimum_python_version": "3.10", "os_version": "ubuntu-24.04", From f43a78f68118a60437081af4c1b7dea28a8fec54 Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Thu, 11 Jun 2026 09:15:32 +0200 Subject: [PATCH 2/4] Regenerate cd.yml --- .github/workflows/cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2703e43b1..50df95595 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -25,6 +25,7 @@ jobs: secrets: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + publish-docs: needs: - build-and-publish From 4a3c4a69ef0b7578fea5d0f0a421a4034b284bd4 Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Thu, 11 Jun 2026 09:24:04 +0200 Subject: [PATCH 3/4] Alphabetize by name --- exasol/toolbox/config.py | 4 ++-- test/unit/config_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exasol/toolbox/config.py b/exasol/toolbox/config.py index 280f8648e..1c67d7f54 100644 --- a/exasol/toolbox/config.py +++ b/exasol/toolbox/config.py @@ -299,10 +299,10 @@ def github_template_dict(self) -> dict[str, Any]: Dictionary of variables to dynamically render Jinja2 templates into valid YAML configurations. """ + cd_extension = self.github_workflow_directory / "cd-extension.yml" fast_tests_extension = ( self.github_workflow_directory / "fast-tests-extension.yml" ) - cd_extension = self.github_workflow_directory / "cd-extension.yml" merge_gate_extension = ( self.github_workflow_directory / "merge-gate-extension.yml" ) @@ -315,8 +315,8 @@ def github_template_dict(self) -> dict[str, Any]: "sonar_token_name": self.sonar_token_name, "workflow_header": f"{WORKFLOW_HEADER_PREFIX}{__version__}.", "workflow_extension": { - "fast_tests": fast_tests_extension.is_file(), "cd": cd_extension.is_file(), + "fast_tests": fast_tests_extension.is_file(), "merge_gate": merge_gate_extension.is_file(), }, } diff --git a/test/unit/config_test.py b/test/unit/config_test.py index 9f1555471..cf931fe03 100644 --- a/test/unit/config_test.py +++ b/test/unit/config_test.py @@ -60,8 +60,8 @@ def test_works_as_defined(tmp_path, test_project_config_factory): "3.14", ), "workflow_extension": { - "fast_tests": False, "cd": False, + "fast_tests": False, "merge_gate": False, }, }, From f341f01c9ba1a489db82690bf600a391b4f6e691 Mon Sep 17 00:00:00 2001 From: Ariel Schulz <43442541+ArBridgeman@users.noreply.github.com> Date: Thu, 11 Jun 2026 09:49:14 +0200 Subject: [PATCH 4/4] Update doc/changes/unreleased.md Co-authored-by: Christoph Kuhnke --- doc/changes/unreleased.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index 1f3b22041..9f9516f0c 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -5,4 +5,4 @@ ## Feature -* #730: Added workflow extensions to `cd` +* #730: Added support to extend GitHub workflow `cd.yml`