Skip to content

Commit d750022

Browse files
authored
Update release docs for Helm Chart to use breeze workflow-run (apache#57255)
Fixes: apache#50569
1 parent 505d9e4 commit d750022

File tree

2 files changed

+54
-12
lines changed

2 files changed

+54
-12
lines changed

dev/README_RELEASE_HELM_CHART.md

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -746,31 +746,72 @@ you need to run several workflows to publish the documentation. More details abo
746746
[Docs README](../docs/README.md) showing the architecture and workflows including manual workflows for
747747
emergency cases.
748748

749-
There are two steps to publish the documentation:
749+
There are two ways to publish the documentation - using breeze command from your local machine or
750+
using breeze commands from GitHub Actions. Both are actually execute remote workflows in GitHub Actions.
750751

751-
1. Publish the documentation to the `live` S3 bucket.
752+
### Using breeze commands
752753

753-
The release manager publishes the documentation using GitHub Actions workflow
754-
[Publish Docs to S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
754+
You can use the `breeze` command to publish the documentation.
755+
The command does the following:
756+
757+
1. Triggers [Publish Docs to S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
758+
2. Triggers workflow in apache/airflow-site to refresh
759+
3. Triggers S3 to GitHub Sync
760+
761+
```shell script
762+
breeze workflow-run publish-docs --ref <tag> --site-env <staging/live/auto> helm-chart
763+
```
764+
765+
The `--ref` parameter should be the tag of the release candidate you are publishing. This should be a
766+
release tag like `helm-chart/1.1.0`
767+
768+
The `--site-env` parameter should be set to `staging` for pre-release versions or `live` for final releases.
769+
The default option is `auto` which should automatically select the right environment based on the tag name.
770+
771+
Other available parameters can be found with:
772+
773+
```shell script
774+
breeze workflow-run publish-docs --help
775+
```
755776

756-
You should specify the tag to use to build the docs and 'helm-chart' passed as packages to be built.
777+
One of the interesting features of publishing this way is that you can also rebuild historical version of
778+
the documentation with patches applied to the documentation (if they can be applied cleanly).
779+
780+
Yoy should specify the `--apply-commits` parameter with the list of commits you want to apply
781+
separated by commas and the workflow will apply those commits to the documentation before
782+
building it. (don't forget to add --skip-write-to-stable-folder if you are publishing
783+
previous version of the distribution). Example:
784+
785+
```shell script
786+
breeze workflow-run publish-docs --ref helm-chart/1.18.0 --site-env staging \
787+
--apply-commits 4ae273cbedec66c87dc40218c7a94863390a380d,e61e9618bdd6be8213d277b1427f67079fcb1d9b \
788+
--skip-write-to-stable-folder \
789+
helm-chart
790+
```
791+
792+
### Manually using GitHub Actions
793+
794+
There are two steps to publish the documentation:
795+
796+
1. Publish the documentation to the `staging` S3 bucket.
757797

758798
The release manager publishes the documentation using GitHub Actions workflow
759-
[Publish Docs to S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml). By default
760-
`auto` selection should publish to the `live` bucket - based on
799+
[Publish Docs to S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml). By default `auto` selection should publish to the `staging` bucket - based on
761800
the tag you use - pre-release tags go to staging. But you can also override it and specify the destination
762801
manually to be `live` or `staging`.
763802

764-
After that step, the provider documentation should be available under the https://airflow.apache.org
765-
(same as in the helm chart documentation).
803+
You should specify 'helm-chart' passed as packages to be built.
804+
805+
After that step, the provider documentation should be available under https://airflow.stage.apache.org//
806+
URL (RC PyPI packages are build with the staging urls) but stable links and drop-down boxes are not updated yet.
766807

767-
2. Invalidated Fastly cache for the documentation.
808+
2. Invalidate Fastly cache, update version drop-down and stable links with the new versions of the documentation.
768809

769810
In order to do it, you need to run the [Build docs](https://github.com/apache/airflow-site/actions/workflows/build.yml)
770-
workflow in `airflow-site` repository. Make sure to use `main` branch.
811+
workflow in `airflow-site` repository - but make sure to use `staging` branch.
771812

772813
After that workflow completes, the new version should be available in the drop-down list and stable links
773-
should be updated and Fastly cache should be invalidated.
814+
should be updated, also Fastly cache will be updated
774815

775816
## Update `index.yaml` in airflow-site
776817

dev/breeze/src/airflow_breeze/commands/workflow_commands.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def workflow_run_publish(
148148
get_console().print(
149149
f"[red]Error: Ref {ref} does not exists in repo apache/airflow .[/red]",
150150
)
151+
get_console().print("\nYou can add --skip-tag-validation to skip this validation.")
151152
sys.exit(1)
152153

153154
get_console().print(

0 commit comments

Comments
 (0)