Skip to content

Commit

Permalink
ci: Split the release workflow by product (#913)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
NickLarsenNZ authored Nov 4, 2024
1 parent c61a928 commit 61c4ee7
Show file tree
Hide file tree
Showing 31 changed files with 391 additions and 346 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/add-product.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ assignees: ''
- [ ] Add a `versions.py` file to the folder. Add all required key-value pairs.
- [ ] Add a new "Update Product" issue template in `.github/ISSUE_TEMPLATE/`
folder. See existing ones as a guide of reference.
- [ ] Add a new `dev_<PRODUCT>.yml` GitHub Action workflow in the
- [ ] Add a new `build_<PRODUCT>.yml` GitHub Action workflow in the
`.github/workflows` folder. Use existing local action whenever possible
or consider creating a new one when there is no fitting action available.
- [ ] Run `.scripts/update_readme_badges.sh` to generate the new status badge.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@ name: Build Airflow

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

on:
workflow_dispatch:
schedule:
- cron: '0 1 1/2 * *' # https://crontab.guru/#0_1_1/2_*_*
push:
branches:
- main
branches: [main]
tags: ['*']
paths:
# To check dependencies, run this ( you will need to consider transitive dependencies)
# bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
- airflow/**
- vector/**
- stackable-base/**
- .github/actions/**
- .github/workflows/dev_airflow.yaml
- .github/workflows/build_airflow.yaml

jobs:
generate_matrix:
Expand All @@ -27,7 +28,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- id: shard
uses: stackabletech/actions/shard@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
product-name: ${{ env.PRODUCT_NAME }}
outputs:
Expand All @@ -50,18 +51,19 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Free Disk Space
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0

- name: Build Product Image
id: build
uses: stackabletech/actions/build-product-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
product-name: ${{ env.PRODUCT_NAME }}
product-version: ${{ matrix.versions }}
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
sdp-version: ${{ env.SDP_VERSION }}

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

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

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

- name: Publish and Sign Image Index Manifest to oci.stackable.tech
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
image-registry-uri: oci.stackable.tech
image-registry-username: robot$sdp+github-action-build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ name: Build Druid

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

on:
workflow_dispatch:
schedule:
- cron: '0 1 1/2 * *' # https://crontab.guru/#0_1_1/2_*_*
push:
branches:
- main
branches: [main]
tags: ['*']
paths:
# To check dependencies, run this ( you will need to consider transitive dependencies)
# bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
Expand All @@ -20,7 +21,7 @@ on:
- java-base/**
- java-devel/**
- .github/actions/**
- .github/workflows/dev_druid.yaml
- .github/workflows/build_druid.yaml

jobs:
generate_matrix:
Expand All @@ -29,7 +30,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- id: shard
uses: stackabletech/actions/shard@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
product-name: ${{ env.PRODUCT_NAME }}
outputs:
Expand All @@ -52,18 +53,19 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Free Disk Space
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0

- name: Build Product Image
id: build
uses: stackabletech/actions/build-product-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
product-name: ${{ env.PRODUCT_NAME }}
product-version: ${{ matrix.versions }}
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
sdp-version: ${{ env.SDP_VERSION }}

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

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

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

- name: Publish and Sign Image Index Manifest to oci.stackable.tech
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
image-registry-uri: oci.stackable.tech
image-registry-username: robot$sdp+github-action-build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ name: Build Hadoop

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

on:
workflow_dispatch:
schedule:
- cron: '0 1 1/2 * *' # https://crontab.guru/#0_1_1/2_*_*
push:
branches:
- main
branches: [main]
tags: ['*']
paths:
# To check dependencies, run this ( you will need to consider transitive dependencies)
# bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
Expand All @@ -20,7 +21,7 @@ on:
- java-base/**
- java-devel/**
- .github/actions/**
- .github/workflows/dev_hadoop.yaml
- .github/workflows/build_hadoop.yaml

jobs:
generate_matrix:
Expand All @@ -29,7 +30,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- id: shard
uses: stackabletech/actions/shard@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
product-name: ${{ env.PRODUCT_NAME }}
outputs:
Expand All @@ -52,18 +53,19 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Free Disk Space
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0

- name: Build Product Image
id: build
uses: stackabletech/actions/build-product-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
product-name: ${{ env.PRODUCT_NAME }}
product-version: ${{ matrix.versions }}
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
sdp-version: ${{ env.SDP_VERSION }}

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

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

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

- name: Publish and Sign Image Index Manifest to oci.stackable.tech
uses: stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
image-registry-uri: oci.stackable.tech
image-registry-username: robot$sdp+github-action-build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ name: Build HBase

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

on:
workflow_dispatch:
schedule:
- cron: '0 1 1/2 * *' # https://crontab.guru/#0_1_1/2_*_*
push:
branches:
- main
branches: [main]
tags: ['*']
paths:
# To check dependencies, run this ( you will need to consider transitive dependencies)
# bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
Expand All @@ -21,7 +22,7 @@ on:
- java-base/**
- java-devel/**
- .github/actions/**
- .github/workflows/dev_hbase.yaml
- .github/workflows/build_hbase.yaml

jobs:
generate_matrix:
Expand All @@ -30,7 +31,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- id: shard
uses: stackabletech/actions/shard@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
product-name: ${{ env.PRODUCT_NAME }}
outputs:
Expand All @@ -53,18 +54,19 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Free Disk Space
uses: stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0

- name: Build Product Image
id: build
uses: stackabletech/actions/build-product-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1.0
uses: stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2.0
with:
product-name: ${{ env.PRODUCT_NAME }}
product-version: ${{ matrix.versions }}
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
sdp-version: ${{ env.SDP_VERSION }}

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

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

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

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

0 comments on commit 61c4ee7

Please sign in to comment.