This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 0c926388217 Re-add conditional prod image build (#45320)
0c926388217 is described below
commit 0c926388217543050d1423d97c8dd3da6c1e679b
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Jan 1 10:10:02 2025 +0100
Re-add conditional prod image build (#45320)
Prod image build sometimes (quite often) is not needed. When
removing `pull_request_target` in #45266 `wait-for=prod-images`
had the condition that prevented it from running (and the
`build-prod-images` step depended on it) - but this condition
is gone now.
Instead of preventing the whole composite workflow from running,
we are adding it to "build-prod-packages" so that the whole
workflow can complete as prerequisite to "finalize-tests" which
should be executed regardless from `prod-image-build` being
executed.
---
.github/workflows/ci.yml | 1 +
.github/workflows/prod-image-build.yml | 5 +++++
.github/workflows/prod-image-extra-checks.yml | 2 ++
3 files changed, 8 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0b64dd203c8..2118ab0a5db 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -557,6 +557,7 @@ jobs:
constraints-branch: ${{
needs.build-info.outputs.default-constraints-branch }}
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
disable-airflow-repo-cache: ${{
needs.build-info.outputs.disable-airflow-repo-cache }}
+ prod-image-build: ${{ needs.build-info.outputs.prod-image-build }}
additional-prod-image-tests:
name: "Additional PROD image tests"
diff --git a/.github/workflows/prod-image-build.yml
b/.github/workflows/prod-image-build.yml
index 81e4346e6a0..1f8905c19fa 100644
--- a/.github/workflows/prod-image-build.yml
+++ b/.github/workflows/prod-image-build.yml
@@ -112,12 +112,17 @@ on: # yamllint disable-line rule:truthy
description: "Disable airflow repo cache read from main."
required: true
type: string
+ prod-image-build:
+ description: "Whether this is a prod-image build (true/false)"
+ required: true
+ type: string
jobs:
build-prod-packages:
name: "Build Airflow and provider packages"
timeout-minutes: 10
runs-on: ${{ fromJSON(inputs.runs-on-as-json-public) }}
+ if: inputs.prod-image-build == 'true'
env:
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
VERSION_SUFFIX_FOR_PYPI: ${{ inputs.branch == 'main' && 'dev0' || '' }}
diff --git a/.github/workflows/prod-image-extra-checks.yml
b/.github/workflows/prod-image-extra-checks.yml
index d8d51d0d4fc..f5a4b771436 100644
--- a/.github/workflows/prod-image-extra-checks.yml
+++ b/.github/workflows/prod-image-extra-checks.yml
@@ -86,6 +86,7 @@ jobs:
constraints-branch: ${{ inputs.constraints-branch }}
docker-cache: ${{ inputs.docker-cache }}
disable-airflow-repo-cache: ${{ inputs.disable-airflow-repo-cache }}
+ prod-image-build: "true"
pip-image:
uses: ./.github/workflows/prod-image-build.yml
@@ -110,3 +111,4 @@ jobs:
constraints-branch: ${{ inputs.constraints-branch }}
docker-cache: ${{ inputs.docker-cache }}
disable-airflow-repo-cache: ${{ inputs.disable-airflow-repo-cache }}
+ prod-image-build: "true"