11---
22name : Build Airflow
3+ run-name : |
4+ Build Airflow (attempt #${{ github.run_attempt }})
35
46env :
57 PRODUCT_NAME : airflow
8+ SDP_VERSION : ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}
69
710on :
811 workflow_dispatch :
912 schedule :
10- - cron : ' 0 1 1/2 * *' # https://crontab.guru/#0_1_1 /2_*_*
13+ - cron : ' 0 0 1/2 * *' # https://crontab.guru/#0_0_1 /2_*_*
1114 push :
12- branches :
13- - main
15+ branches : [main]
16+ tags : ['*']
1417 paths :
1518 # To check dependencies, run this ( you will need to consider transitive dependencies)
1619 # bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
1720 - airflow/**
1821 - vector/**
1922 - stackable-base/**
2023 - .github/actions/**
21- - .github/workflows/dev_airflow .yaml
24+ - .github/workflows/build_airflow .yaml
2225
2326jobs :
2427 generate_matrix :
2528 name : Generate Version List
2629 runs-on : ubuntu-latest
2730 steps :
2831 - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
32+ with :
33+ persist-credentials : false
2934 - id : shard
30- uses : stackabletech/actions/shard@0c5dbc42a80519b5e1ad6ac1d8bc54a0e1ece8fb # 0.0.7
35+ uses : stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
3136 with :
3237 product-name : ${{ env.PRODUCT_NAME }}
3338 outputs :
4045 id-token : write
4146 runs-on : ${{ matrix.runner.name }}
4247 strategy :
48+ fail-fast : false
4349 matrix :
4450 runner :
4551 - {name: "ubuntu-latest", arch: "amd64"}
@@ -48,17 +54,23 @@ jobs:
4854 steps :
4955 - name : Checkout Repository
5056 uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
57+ with :
58+ persist-credentials : false
59+
60+ - name : Free Disk Space
61+ uses : stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
5162
5263 - name : Build Product Image
5364 id : build
54- uses : stackabletech/actions/build-product-image@0c5dbc42a80519b5e1ad6ac1d8bc54a0e1ece8fb # 0.0.7
65+ uses : stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
5566 with :
5667 product-name : ${{ env.PRODUCT_NAME }}
5768 product-version : ${{ matrix.versions }}
5869 build-cache-password : ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
70+ sdp-version : ${{ env.SDP_VERSION }}
5971
6072 - name : Publish Container Image on docker.stackable.tech
61- uses : stackabletech/actions/publish-image@0c5dbc42a80519b5e1ad6ac1d8bc54a0e1ece8fb # 0.0.7
73+ uses : stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
6274 with :
6375 image-registry-uri : docker.stackable.tech
6476 image-registry-username : github
6880 source-image-uri : localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
6981
7082 - name : Publish Container Image on oci.stackable.tech
71- uses : stackabletech/actions/publish-image@0c5dbc42a80519b5e1ad6ac1d8bc54a0e1ece8fb # 0.0.7
83+ uses : stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
7284 with :
7385 image-registry-uri : oci.stackable.tech
7486 image-registry-username : robot$sdp+github-action-build
@@ -84,26 +96,75 @@ jobs:
8496 id-token : write
8597 runs-on : ubuntu-latest
8698 strategy :
99+ fail-fast : false
87100 matrix :
88101 versions : ${{ fromJson(needs.generate_matrix.outputs.versions) }}
89102 steps :
90103 - name : Checkout Repository
91104 uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
105+ with :
106+ persist-credentials : false
92107
93108 - name : Publish and Sign Image Index Manifest to docker.stackable.tech
94- uses : stackabletech/actions/publish-index-manifest@0c5dbc42a80519b5e1ad6ac1d8bc54a0e1ece8fb # 0.0.7
109+ uses : stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
95110 with :
96111 image-registry-uri : docker.stackable.tech
97112 image-registry-username : github
98113 image-registry-password : ${{ secrets.NEXUS_PASSWORD }}
99114 image-repository : stackable/${{ env.PRODUCT_NAME }}
100- image-index-manifest-tag : ${{ matrix.versions }}-stackable0.0.0-dev
115+ image-index-manifest-tag : ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }}
101116
102117 - name : Publish and Sign Image Index Manifest to oci.stackable.tech
103- uses : stackabletech/actions/publish-index-manifest@0c5dbc42a80519b5e1ad6ac1d8bc54a0e1ece8fb # 0.0.7
118+ uses : stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
104119 with :
105120 image-registry-uri : oci.stackable.tech
106121 image-registry-username : robot$sdp+github-action-build
107122 image-registry-password : ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
108123 image-repository : sdp/${{ env.PRODUCT_NAME }}
109- image-index-manifest-tag : ${{ matrix.versions }}-stackable0.0.0-dev
124+ image-index-manifest-tag : ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }}
125+
126+ notify :
127+ name : Failure Notification
128+ needs : [generate_matrix, build, publish_manifests]
129+ runs-on : ubuntu-latest
130+ if : failure()
131+ steps :
132+ - uses : slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
133+ with :
134+ channel-id : " C07UG6JH44F" # notifications-container-images
135+ payload : |
136+ {
137+ "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
138+ "attachments": [
139+ {
140+ "pretext": "See the details below for a summary of which job(s) failed.",
141+ "color": "#aa0000",
142+ "fields": [
143+ {
144+ "title": "Generate Version List",
145+ "short": true,
146+ "value": "${{ needs.generate_matrix.result }}"
147+ },
148+ {
149+ "title": "Build/Publish Image",
150+ "short": true,
151+ "value": "${{ needs.build.result }}"
152+ },
153+ {
154+ "title": "Build/Publish Manifests",
155+ "short": true,
156+ "value": "${{ needs.publish_manifests.result }}"
157+ }
158+ ],
159+ "actions": [
160+ {
161+ "type": "button",
162+ "text": "Go to workflow run",
163+ "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
164+ }
165+ ]
166+ }
167+ ]
168+ }
169+ env :
170+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
0 commit comments