Skip to content

Commit 61c4ee7

Browse files
authored
ci: Split the release workflow by product (#913)
* ci: rename dev_* workflows to be more generic (for later reusae as release workflows). * ci: Handle release in the same build workflows * chore: fix typo in script * chore: update changelog * chore: fix the typo fix's typo in script * refactor: collapse yaml lines, change variable name
1 parent c61a928 commit 61c4ee7

31 files changed

+391
-346
lines changed

.github/ISSUE_TEMPLATE/add-product.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ assignees: ''
2020
- [ ] Add a `versions.py` file to the folder. Add all required key-value pairs.
2121
- [ ] Add a new "Update Product" issue template in `.github/ISSUE_TEMPLATE/`
2222
folder. See existing ones as a guide of reference.
23-
- [ ] Add a new `dev_<PRODUCT>.yml` GitHub Action workflow in the
23+
- [ ] Add a new `build_<PRODUCT>.yml` GitHub Action workflow in the
2424
`.github/workflows` folder. Use existing local action whenever possible
2525
or consider creating a new one when there is no fitting action available.
2626
- [ ] Run `.scripts/update_readme_badges.sh` to generate the new status badge.

.github/workflows/dev_airflow.yaml .github/workflows/build_airflow.yaml

+13-11
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@ name: Build Airflow
33

44
env:
55
PRODUCT_NAME: airflow
6+
SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}
67

78
on:
89
workflow_dispatch:
910
schedule:
1011
- cron: '0 1 1/2 * *' # https://crontab.guru/#0_1_1/2_*_*
1112
push:
12-
branches:
13-
- main
13+
branches: [main]
14+
tags: ['*']
1415
paths:
1516
# To check dependencies, run this ( you will need to consider transitive dependencies)
1617
# bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
1718
- airflow/**
1819
- vector/**
1920
- stackable-base/**
2021
- .github/actions/**
21-
- .github/workflows/dev_airflow.yaml
22+
- .github/workflows/build_airflow.yaml
2223

2324
jobs:
2425
generate_matrix:
@@ -27,7 +28,7 @@ jobs:
2728
steps:
2829
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2930
- id: shard
30-
uses: stackabletech/actions/shard@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
31+
uses: stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
3132
with:
3233
product-name: ${{ env.PRODUCT_NAME }}
3334
outputs:
@@ -50,18 +51,19 @@ jobs:
5051
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5152

5253
- name: Free Disk Space
53-
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
54+
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
5455

5556
- name: Build Product Image
5657
id: build
57-
uses: stackabletech/actions/build-product-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
58+
uses: stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
5859
with:
5960
product-name: ${{ env.PRODUCT_NAME }}
6061
product-version: ${{ matrix.versions }}
6162
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
63+
sdp-version: ${{ env.SDP_VERSION }}
6264

6365
- name: Publish Container Image on docker.stackable.tech
64-
uses: stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
66+
uses: stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
6567
with:
6668
image-registry-uri: docker.stackable.tech
6769
image-registry-username: github
@@ -71,7 +73,7 @@ jobs:
7173
source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
7274

7375
- name: Publish Container Image on oci.stackable.tech
74-
uses: stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
76+
uses: stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
7577
with:
7678
image-registry-uri: oci.stackable.tech
7779
image-registry-username: robot$sdp+github-action-build
@@ -94,9 +96,9 @@ jobs:
9496
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
9597

9698
- name: Free Disk Space
97-
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
99+
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
98100
- name: Publish and Sign Image Index Manifest to docker.stackable.tech
99-
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
101+
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
100102
with:
101103
image-registry-uri: docker.stackable.tech
102104
image-registry-username: github
@@ -105,7 +107,7 @@ jobs:
105107
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
106108

107109
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
108-
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
110+
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
109111
with:
110112
image-registry-uri: oci.stackable.tech
111113
image-registry-username: robot$sdp+github-action-build

.github/workflows/dev_druid.yaml .github/workflows/build_druid.yaml

+13-11
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ name: Build Druid
33

44
env:
55
PRODUCT_NAME: druid
6+
SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}
67

78
on:
89
workflow_dispatch:
910
schedule:
1011
- cron: '0 1 1/2 * *' # https://crontab.guru/#0_1_1/2_*_*
1112
push:
12-
branches:
13-
- main
13+
branches: [main]
14+
tags: ['*']
1415
paths:
1516
# To check dependencies, run this ( you will need to consider transitive dependencies)
1617
# bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
@@ -20,7 +21,7 @@ on:
2021
- java-base/**
2122
- java-devel/**
2223
- .github/actions/**
23-
- .github/workflows/dev_druid.yaml
24+
- .github/workflows/build_druid.yaml
2425

2526
jobs:
2627
generate_matrix:
@@ -29,7 +30,7 @@ jobs:
2930
steps:
3031
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3132
- id: shard
32-
uses: stackabletech/actions/shard@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
33+
uses: stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
3334
with:
3435
product-name: ${{ env.PRODUCT_NAME }}
3536
outputs:
@@ -52,18 +53,19 @@ jobs:
5253
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5354

5455
- name: Free Disk Space
55-
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
56+
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
5657

5758
- name: Build Product Image
5859
id: build
59-
uses: stackabletech/actions/build-product-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
60+
uses: stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
6061
with:
6162
product-name: ${{ env.PRODUCT_NAME }}
6263
product-version: ${{ matrix.versions }}
6364
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
65+
sdp-version: ${{ env.SDP_VERSION }}
6466

6567
- name: Publish Container Image on docker.stackable.tech
66-
uses: stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
68+
uses: stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
6769
with:
6870
image-registry-uri: docker.stackable.tech
6971
image-registry-username: github
@@ -73,7 +75,7 @@ jobs:
7375
source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
7476

7577
- name: Publish Container Image on oci.stackable.tech
76-
uses: stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
78+
uses: stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
7779
with:
7880
image-registry-uri: oci.stackable.tech
7981
image-registry-username: robot$sdp+github-action-build
@@ -96,9 +98,9 @@ jobs:
9698
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
9799

98100
- name: Free Disk Space
99-
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
101+
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
100102
- name: Publish and Sign Image Index Manifest to docker.stackable.tech
101-
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
103+
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
102104
with:
103105
image-registry-uri: docker.stackable.tech
104106
image-registry-username: github
@@ -107,7 +109,7 @@ jobs:
107109
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
108110

109111
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
110-
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
112+
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
111113
with:
112114
image-registry-uri: oci.stackable.tech
113115
image-registry-username: robot$sdp+github-action-build

.github/workflows/dev_hadoop.yaml .github/workflows/build_hadoop.yaml

+13-11
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ name: Build Hadoop
33

44
env:
55
PRODUCT_NAME: hadoop
6+
SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}
67

78
on:
89
workflow_dispatch:
910
schedule:
1011
- cron: '0 1 1/2 * *' # https://crontab.guru/#0_1_1/2_*_*
1112
push:
12-
branches:
13-
- main
13+
branches: [main]
14+
tags: ['*']
1415
paths:
1516
# To check dependencies, run this ( you will need to consider transitive dependencies)
1617
# bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
@@ -20,7 +21,7 @@ on:
2021
- java-base/**
2122
- java-devel/**
2223
- .github/actions/**
23-
- .github/workflows/dev_hadoop.yaml
24+
- .github/workflows/build_hadoop.yaml
2425

2526
jobs:
2627
generate_matrix:
@@ -29,7 +30,7 @@ jobs:
2930
steps:
3031
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3132
- id: shard
32-
uses: stackabletech/actions/shard@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
33+
uses: stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
3334
with:
3435
product-name: ${{ env.PRODUCT_NAME }}
3536
outputs:
@@ -52,18 +53,19 @@ jobs:
5253
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5354

5455
- name: Free Disk Space
55-
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
56+
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
5657

5758
- name: Build Product Image
5859
id: build
59-
uses: stackabletech/actions/build-product-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
60+
uses: stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
6061
with:
6162
product-name: ${{ env.PRODUCT_NAME }}
6263
product-version: ${{ matrix.versions }}
6364
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
65+
sdp-version: ${{ env.SDP_VERSION }}
6466

6567
- name: Publish Container Image on docker.stackable.tech
66-
uses: stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
68+
uses: stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
6769
with:
6870
image-registry-uri: docker.stackable.tech
6971
image-registry-username: github
@@ -73,7 +75,7 @@ jobs:
7375
source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
7476

7577
- name: Publish Container Image on oci.stackable.tech
76-
uses: stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
78+
uses: stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
7779
with:
7880
image-registry-uri: oci.stackable.tech
7981
image-registry-username: robot$sdp+github-action-build
@@ -96,9 +98,9 @@ jobs:
9698
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
9799

98100
- name: Free Disk Space
99-
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
101+
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
100102
- name: Publish and Sign Image Index Manifest to docker.stackable.tech
101-
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
103+
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
102104
with:
103105
image-registry-uri: docker.stackable.tech
104106
image-registry-username: github
@@ -107,7 +109,7 @@ jobs:
107109
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
108110

109111
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
110-
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
112+
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
111113
with:
112114
image-registry-uri: oci.stackable.tech
113115
image-registry-username: robot$sdp+github-action-build

.github/workflows/dev_hbase.yaml .github/workflows/build_hbase.yaml

+13-11
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ name: Build HBase
33

44
env:
55
PRODUCT_NAME: hbase
6+
SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}
67

78
on:
89
workflow_dispatch:
910
schedule:
1011
- cron: '0 1 1/2 * *' # https://crontab.guru/#0_1_1/2_*_*
1112
push:
12-
branches:
13-
- main
13+
branches: [main]
14+
tags: ['*']
1415
paths:
1516
# To check dependencies, run this ( you will need to consider transitive dependencies)
1617
# bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
@@ -21,7 +22,7 @@ on:
2122
- java-base/**
2223
- java-devel/**
2324
- .github/actions/**
24-
- .github/workflows/dev_hbase.yaml
25+
- .github/workflows/build_hbase.yaml
2526

2627
jobs:
2728
generate_matrix:
@@ -30,7 +31,7 @@ jobs:
3031
steps:
3132
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3233
- id: shard
33-
uses: stackabletech/actions/shard@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
34+
uses: stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
3435
with:
3536
product-name: ${{ env.PRODUCT_NAME }}
3637
outputs:
@@ -53,18 +54,19 @@ jobs:
5354
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5455

5556
- name: Free Disk Space
56-
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
57+
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
5758

5859
- name: Build Product Image
5960
id: build
60-
uses: stackabletech/actions/build-product-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
61+
uses: stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
6162
with:
6263
product-name: ${{ env.PRODUCT_NAME }}
6364
product-version: ${{ matrix.versions }}
6465
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
66+
sdp-version: ${{ env.SDP_VERSION }}
6567

6668
- name: Publish Container Image on docker.stackable.tech
67-
uses: stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
69+
uses: stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
6870
with:
6971
image-registry-uri: docker.stackable.tech
7072
image-registry-username: github
@@ -74,7 +76,7 @@ jobs:
7476
source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
7577

7678
- name: Publish Container Image on oci.stackable.tech
77-
uses: stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
79+
uses: stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
7880
with:
7981
image-registry-uri: oci.stackable.tech
8082
image-registry-username: robot$sdp+github-action-build
@@ -97,9 +99,9 @@ jobs:
9799
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
98100

99101
- name: Free Disk Space
100-
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
102+
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
101103
- name: Publish and Sign Image Index Manifest to docker.stackable.tech
102-
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
104+
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
103105
with:
104106
image-registry-uri: docker.stackable.tech
105107
image-registry-username: github
@@ -108,7 +110,7 @@ jobs:
108110
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
109111

110112
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
111-
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
113+
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
112114
with:
113115
image-registry-uri: oci.stackable.tech
114116
image-registry-username: robot$sdp+github-action-build

0 commit comments

Comments
 (0)