Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/cd.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Unreleased

## Summary


## Feature

* #730: Added support to extend GitHub workflow `cd.yml`
9 changes: 6 additions & 3 deletions doc/user_guide/features/github_workflows/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions exasol/toolbox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ 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"
)
Expand All @@ -314,6 +315,7 @@ def github_template_dict(self) -> dict[str, Any]:
"sonar_token_name": self.sonar_token_name,
"workflow_header": f"{WORKFLOW_HEADER_PREFIX}{__version__}.",
"workflow_extension": {
"cd": cd_extension.is_file(),
"fast_tests": fast_tests_extension.is_file(),
"merge_gate": merge_gate_extension.is_file(),
},
Expand Down
8 changes: 8 additions & 0 deletions exasol/toolbox/templates/github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
ArBridgeman marked this conversation as resolved.
(% endif %)

publish-docs:
needs:
- build-and-publish
Expand Down
6 changes: 5 additions & 1 deletion test/unit/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
"cd": False,
"fast_tests": False,
"merge_gate": False,
},
},
"minimum_python_version": "3.10",
"os_version": "ubuntu-24.04",
Expand Down