Skip to content

Commit

Permalink
Improve production image release workflow (#24481)
Browse files Browse the repository at this point in the history
Few improvements:

* direct link to workflow in the docs
* "green" success screenshots (separate screenshot for rc)
* job and step names contain both Airflow version and python version
* running subsequent build with same version will cancel past
  in-progress build (in case you quickly make constraint fis for
  example and re-run)
  • Loading branch information
potiuk authored Jun 16, 2022
1 parent 7848f04 commit 8ad18bf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/release_dockerhub_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.
#
---
name: "Release PROD image"
name: "Release PROD images"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
Expand All @@ -27,6 +27,9 @@ on: # yamllint disable-line rule:truthy
description: 'Skip Latest: Set to true if not latest.'
default: ''
required: false
concurrency:
group: ${{ github.event.inputs.airflowVersion }}
cancel-in-progress: true
jobs:
build-info:
timeout-minutes: 10
Expand All @@ -53,7 +56,7 @@ jobs:
run: ./scripts/ci/selective_ci_checks.sh
release-images:
timeout-minutes: 120
name: "Release images"
name: "Release images: ${{ github.event.inputs.airflowVersion }}, ${{ matrix.python-version }}"
runs-on: ${{ github.repository == 'apache/airflow' && 'self-hosted' || 'ubuntu-20.04' }}
needs: [build-info]
strategy:
Expand Down Expand Up @@ -98,15 +101,17 @@ jobs:
run: >
echo ${{ secrets.DOCKERHUB_TOKEN }} |
docker login --password-stdin --username ${{ secrets.DOCKERHUB_USER }}
- name: "Release regular images"
- name: >
Release regular images: ${{ github.event.inputs.airflowVersion }}, ${{ matrix.python-version }}
run: >
breeze release-prod-images
--dockerhub-repo ${{ github.repository }}
--airflow-version ${{ github.event.inputs.airflowVersion }}
${{ needs.build-info.outputs.skipLatest }}
${{ needs.build-info.outputs.limitPlatform }}
--limit-python ${{ matrix.python-version }}
- name: "Release slim images"
- name: >
Release slim images: ${{ github.event.inputs.airflowVersion }}, ${{ matrix.python-version }}
run: >
breeze release-prod-images
--dockerhub-repo ${{ github.repository }}
Expand Down
18 changes: 9 additions & 9 deletions dev/README_RELEASE_AIRFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- [Build RC artifacts](#build-rc-artifacts)
- [[\Optional\] Prepare new release branches and cache](#%5Coptional%5C-prepare-new-release-branches-and-cache)
- [Prepare PyPI convenience "snapshot" packages](#prepare-pypi-convenience-snapshot-packages)
- [Prepare production Docker Image](#prepare-production-docker-image)
- [Prepare production Docker Image RC](#prepare-production-docker-image-rc)
- [Prepare issue for testing status of rc](#prepare-issue-for-testing-status-of-rc)
- [Prepare Vote email on the Apache Airflow release candidate](#prepare-vote-email-on-the-apache-airflow-release-candidate)
- [Verify the release candidate by PMCs](#verify-the-release-candidate-by-pmcs)
Expand Down Expand Up @@ -487,7 +487,7 @@ is not supposed to be used by and advertised to the end-users who do not read th
git push origin tag ${VERSION}
```
## Prepare production Docker Image
## Prepare production Docker Image RC
Production Docker images should be manually prepared and pushed by the release manager or another committer
who has access to Airflow's DockerHub. Note that we started releasing a multi-platform build, so you need
Expand All @@ -497,15 +497,15 @@ to have an environment prepared to build multi-platform images. You can achieve
* Emulation (very slow)
* Hardware builders if you have both AMD64 and ARM64 hardware locally

Building the image is triggered by running the `Release PROD image` workflow via
[GitHub Actions](https://github.com/apache/airflow/actions).
Building the image is triggered by running the
[Release PROD Images](https://github.com/apache/airflow/actions/workflows/release_dockerhub_image.yml) workflow.

When you trigger it you need to pass:

* Airflow Version
* Optional "true" in skip latest field if you do not want to retag the latest image
* Airflow Version (including the right rc suffix)
* Optional "true" in the "Skip latest:" field if you do not want to re-tag the latest image

![Release prod image](images/release_prod_image.png)
![Release prod image](images/release_prod_image_rc.png)

The manual building is described in [MANUALLY_BUILDING_IMAGES.md](MANUALLY_BUILDING_IMAGES.md).

Expand Down Expand Up @@ -958,8 +958,8 @@ At this point we release an official package:
## Manually prepare production Docker Image
Building the image is triggered by running the `Release PROD image` workflow via
[GitHub Actions](https://github.com/apache/airflow/actions).
Building the image is triggered by running the
[Release PROD Images](https://github.com/apache/airflow/actions/workflows/release_dockerhub_image.yml) workflow.
When you trigger it you need to pass:
Expand Down
Binary file modified dev/images/release_prod_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/images/release_prod_image_rc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8ad18bf

Please sign in to comment.