ποΈ Workflows (CI/CD)#
Generate CI & CI/CD workflows#
The exasol-toolbox simplifies and supports 3 easily maintainable workflows. in order to make them work follow the description bellow.
Workflows:
- CI
Verifies PRβs and regularly checks the project.
- CI/CD
Verifies and publishes releases of the project.
- PR-Merge
Validates merges and updates the documentation.
0. Determine the toolbox version#
One of the snippets bellow, should do the trick:
poetry show exasol-toolboxpython -c "from exasol.toolbox.version import VERSION;print(VERSION)"
1. Configure your project#
Make sure your github project has access to a deployment token for PyPi with the following name: PYPI_TOKEN. It should be available to the repository either as Organization-, Repository- or Environment- secret.
2. Add the standard workflows to your project#
tbox workflow install all
Warning
If you already have various workflows you may want to run the
update instead of the install command.
CI Workflow#
To enable this workflow, add a file with the name ci.yml in your .github/workflows folder and add the following content:
name: CI
on:
push:
branches-ignore:
- "github-pages/*"
- "gh-pages/*"
- "main"
- "master"
pull_request:
types: [opened, reopened]
schedule:
# βAt 00:00 on every 7th day-of-month from 1 through 31.β (https://crontab.guru)
- cron: "0 0 1/7 * *"
jobs:
ci-job:
name: Checks
uses: exasol/python-toolbox/.github/workflows/checks.yml@0.6.1
metrics:
needs: [ ci-job ]
uses: exasol/python-toolbox/.github/workflows/report.yml@0.6.1
CI/CD Workflow#
Attention
Requires PYPI token to be available
To enable this workflow, add a file with the name ci-cd.yml in your .github/workflows folder and add the following content:
name: CI/CD
on:
push:
tags:
- '**'
jobs:
check-tag-version-job:
name: Check Release Tag
uses: exasol/python-toolbox/.github/workflows/check-release-tag.yml@0.6.1
ci-job:
name: Checks
needs: [ check-tag-version-job ]
uses: exasol/python-toolbox/.github/workflows/checks.yml@0.6.1
cd-job:
name: Continues Delivery
needs: [ ci-job ]
uses: exasol/python-toolbox/.github/workflows/build-and-publish.yml@0.6.1
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
metrics:
needs: [ ci-job ]
uses: exasol/python-toolbox/.github/workflows/report.yml@0.6.1
PR-Merge Workflow#
To enable this workflow, add a file with the name pr-merge.yml in your .github/workflows folder and add the following content:
name: PR-Merge
on:
push:
branches:
- 'main'
- 'master'
jobs:
ci-job:
name: Checks
uses: exasol/python-toolbox/.github/workflows/checks.yml@0.6.1
publish-docs:
name: Publish Documentation
uses: exasol/python-toolbox/.github/workflows/gh-pages.yml@0.6.1
metrics:
needs: [ ci-job ]
uses: exasol/python-toolbox/.github/workflows/report.yml@0.6.1