From 0e278c589679ef25acd9cb35ba6c2a2c604b2ff2 Mon Sep 17 00:00:00 2001 From: Techassi Date: Mon, 14 Apr 2025 10:53:46 +0200 Subject: [PATCH 1/5] chore: Remove invalid action input --- .github/workflows/build_airflow.yaml | 1 - .github/workflows/build_druid.yaml | 1 - .github/workflows/build_hadoop.yaml | 1 - .github/workflows/build_hbase.yaml | 1 - .github/workflows/build_hello-world.yaml | 1 - .github/workflows/build_hive.yaml | 1 - .github/workflows/build_java-base.yaml | 1 - .github/workflows/build_java-devel.yaml | 1 - .github/workflows/build_kafka-testing-tools.yaml | 1 - .github/workflows/build_kafka.yaml | 1 - .github/workflows/build_kcat.yaml | 1 - .github/workflows/build_krb5.yaml | 1 - .github/workflows/build_nifi.yaml | 1 - .github/workflows/build_omid.yaml | 1 - .github/workflows/build_opa.yaml | 1 - .github/workflows/build_spark-connect-client.yaml | 1 - .github/workflows/build_spark-k8s.yaml | 1 - .github/workflows/build_stackable-base.yaml | 1 - .github/workflows/build_superset.yaml | 1 - .github/workflows/build_testing-tools.yaml | 1 - .github/workflows/build_tools.yaml | 1 - .github/workflows/build_trino-cli.yaml | 1 - .github/workflows/build_trino.yaml | 1 - .github/workflows/build_vector.yaml | 1 - .github/workflows/build_zookeeper.yaml | 1 - 25 files changed, 25 deletions(-) diff --git a/.github/workflows/build_airflow.yaml b/.github/workflows/build_airflow.yaml index 06a4b4cba..246d16f57 100644 --- a/.github/workflows/build_airflow.yaml +++ b/.github/workflows/build_airflow.yaml @@ -66,7 +66,6 @@ jobs: 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 diff --git a/.github/workflows/build_druid.yaml b/.github/workflows/build_druid.yaml index de0c7ef76..3f4a3b9e4 100644 --- a/.github/workflows/build_druid.yaml +++ b/.github/workflows/build_druid.yaml @@ -68,7 +68,6 @@ jobs: 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 diff --git a/.github/workflows/build_hadoop.yaml b/.github/workflows/build_hadoop.yaml index c891115ab..d3453bb86 100644 --- a/.github/workflows/build_hadoop.yaml +++ b/.github/workflows/build_hadoop.yaml @@ -68,7 +68,6 @@ jobs: 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 diff --git a/.github/workflows/build_hbase.yaml b/.github/workflows/build_hbase.yaml index 0e72f4433..b1d1e0d79 100644 --- a/.github/workflows/build_hbase.yaml +++ b/.github/workflows/build_hbase.yaml @@ -69,7 +69,6 @@ jobs: 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 diff --git a/.github/workflows/build_hello-world.yaml b/.github/workflows/build_hello-world.yaml index c18288009..004d57ab3 100644 --- a/.github/workflows/build_hello-world.yaml +++ b/.github/workflows/build_hello-world.yaml @@ -64,7 +64,6 @@ jobs: 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 diff --git a/.github/workflows/build_hive.yaml b/.github/workflows/build_hive.yaml index f166d9211..0cea73c37 100644 --- a/.github/workflows/build_hive.yaml +++ b/.github/workflows/build_hive.yaml @@ -69,7 +69,6 @@ jobs: 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 diff --git a/.github/workflows/build_java-base.yaml b/.github/workflows/build_java-base.yaml index f18785f27..9e56d808f 100644 --- a/.github/workflows/build_java-base.yaml +++ b/.github/workflows/build_java-base.yaml @@ -64,7 +64,6 @@ jobs: 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 diff --git a/.github/workflows/build_java-devel.yaml b/.github/workflows/build_java-devel.yaml index 7ef02f653..571fa60e1 100644 --- a/.github/workflows/build_java-devel.yaml +++ b/.github/workflows/build_java-devel.yaml @@ -64,7 +64,6 @@ jobs: 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 diff --git a/.github/workflows/build_kafka-testing-tools.yaml b/.github/workflows/build_kafka-testing-tools.yaml index 76f5f108d..c5d4bc26c 100644 --- a/.github/workflows/build_kafka-testing-tools.yaml +++ b/.github/workflows/build_kafka-testing-tools.yaml @@ -68,7 +68,6 @@ jobs: 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 diff --git a/.github/workflows/build_kafka.yaml b/.github/workflows/build_kafka.yaml index 9c8abaf84..413560642 100644 --- a/.github/workflows/build_kafka.yaml +++ b/.github/workflows/build_kafka.yaml @@ -70,7 +70,6 @@ jobs: 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 diff --git a/.github/workflows/build_kcat.yaml b/.github/workflows/build_kcat.yaml index 52ac31679..bed9f8a43 100644 --- a/.github/workflows/build_kcat.yaml +++ b/.github/workflows/build_kcat.yaml @@ -68,7 +68,6 @@ jobs: 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 diff --git a/.github/workflows/build_krb5.yaml b/.github/workflows/build_krb5.yaml index a16d60f18..aec2bd8e0 100644 --- a/.github/workflows/build_krb5.yaml +++ b/.github/workflows/build_krb5.yaml @@ -64,7 +64,6 @@ jobs: 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 diff --git a/.github/workflows/build_nifi.yaml b/.github/workflows/build_nifi.yaml index 4172faff4..c1a275d7d 100644 --- a/.github/workflows/build_nifi.yaml +++ b/.github/workflows/build_nifi.yaml @@ -68,7 +68,6 @@ jobs: 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 diff --git a/.github/workflows/build_omid.yaml b/.github/workflows/build_omid.yaml index 336235dbf..a3382623a 100644 --- a/.github/workflows/build_omid.yaml +++ b/.github/workflows/build_omid.yaml @@ -68,7 +68,6 @@ jobs: 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 diff --git a/.github/workflows/build_opa.yaml b/.github/workflows/build_opa.yaml index 06b6a621d..117261701 100644 --- a/.github/workflows/build_opa.yaml +++ b/.github/workflows/build_opa.yaml @@ -66,7 +66,6 @@ jobs: 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 diff --git a/.github/workflows/build_spark-connect-client.yaml b/.github/workflows/build_spark-connect-client.yaml index a8ec80123..7fdd29858 100644 --- a/.github/workflows/build_spark-connect-client.yaml +++ b/.github/workflows/build_spark-connect-client.yaml @@ -67,7 +67,6 @@ jobs: 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 diff --git a/.github/workflows/build_spark-k8s.yaml b/.github/workflows/build_spark-k8s.yaml index 953119379..f69bbc5c1 100644 --- a/.github/workflows/build_spark-k8s.yaml +++ b/.github/workflows/build_spark-k8s.yaml @@ -69,7 +69,6 @@ jobs: 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 diff --git a/.github/workflows/build_stackable-base.yaml b/.github/workflows/build_stackable-base.yaml index 5c6928a81..778cd0a21 100644 --- a/.github/workflows/build_stackable-base.yaml +++ b/.github/workflows/build_stackable-base.yaml @@ -65,7 +65,6 @@ jobs: 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 diff --git a/.github/workflows/build_superset.yaml b/.github/workflows/build_superset.yaml index 9a98e26c8..a0b8f763f 100644 --- a/.github/workflows/build_superset.yaml +++ b/.github/workflows/build_superset.yaml @@ -66,7 +66,6 @@ jobs: 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 diff --git a/.github/workflows/build_testing-tools.yaml b/.github/workflows/build_testing-tools.yaml index 3b70e5fd1..c5cf477e4 100644 --- a/.github/workflows/build_testing-tools.yaml +++ b/.github/workflows/build_testing-tools.yaml @@ -64,7 +64,6 @@ jobs: 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 diff --git a/.github/workflows/build_tools.yaml b/.github/workflows/build_tools.yaml index 56273238c..015c75655 100644 --- a/.github/workflows/build_tools.yaml +++ b/.github/workflows/build_tools.yaml @@ -65,7 +65,6 @@ jobs: 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 diff --git a/.github/workflows/build_trino-cli.yaml b/.github/workflows/build_trino-cli.yaml index a717f745a..5a3ebfb93 100644 --- a/.github/workflows/build_trino-cli.yaml +++ b/.github/workflows/build_trino-cli.yaml @@ -67,7 +67,6 @@ jobs: 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 diff --git a/.github/workflows/build_trino.yaml b/.github/workflows/build_trino.yaml index 9260accf4..1638b55e7 100644 --- a/.github/workflows/build_trino.yaml +++ b/.github/workflows/build_trino.yaml @@ -68,7 +68,6 @@ jobs: 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 diff --git a/.github/workflows/build_vector.yaml b/.github/workflows/build_vector.yaml index 8c56d78db..51960606f 100644 --- a/.github/workflows/build_vector.yaml +++ b/.github/workflows/build_vector.yaml @@ -64,7 +64,6 @@ jobs: 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 diff --git a/.github/workflows/build_zookeeper.yaml b/.github/workflows/build_zookeeper.yaml index 48bd02153..b8545e189 100644 --- a/.github/workflows/build_zookeeper.yaml +++ b/.github/workflows/build_zookeeper.yaml @@ -68,7 +68,6 @@ jobs: 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 From a27ecf589d341dd4f08a8fac885d18a4f1b22478 Mon Sep 17 00:00:00 2001 From: Techassi Date: Mon, 14 Apr 2025 11:32:27 +0200 Subject: [PATCH 2/5] ci: Add reusable image build workflow --- .github/workflows/reusable_build_image.yaml | 142 ++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 .github/workflows/reusable_build_image.yaml diff --git a/.github/workflows/reusable_build_image.yaml b/.github/workflows/reusable_build_image.yaml new file mode 100644 index 000000000..8b55355cd --- /dev/null +++ b/.github/workflows/reusable_build_image.yaml @@ -0,0 +1,142 @@ +on: + workflow_call: + inputs: + product-name: + required: true + type: string + sdp-version: + required: true + type: string + secrets: + harbor-robot-secret: + description: The secret for the Harbor robot user used to push images and manifest + required: true + slack-token: + description: The Slack token used to post failure notifications + required: true + +jobs: + generate_matrix: + name: Generate Version List + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + persist-credentials: false + - id: shard + uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + with: + product-name: ${{ inputs.product-name }} + outputs: + versions: ${{ steps.shard.outputs.versions }} + + build: + name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image + needs: [generate_matrix] + permissions: + id-token: write + runs-on: ${{ matrix.runner.name }} + strategy: + fail-fast: false + matrix: + runner: + - {name: "ubuntu-latest", arch: "amd64"} + - {name: "ubicloud-standard-8-arm", arch: "arm64"} + versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} + steps: + - name: Checkout Repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + persist-credentials: false + + - name: Free Disk Space + uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + + - name: Build Product Image + id: build + uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + with: + product-name: ${{ inputs.product-name }} + product-version: ${{ matrix.versions }} + sdp-version: ${{ inputs.sdp-version }} + + - name: Publish Container Image on oci.stackable.tech + uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + with: + image-registry-uri: oci.stackable.tech + image-registry-username: robot$sdp+github-action-build + image-registry-password: ${{ secrets.harbor-robot-secret }} + image-repository: sdp/${{ inputs.product-name }} + image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} + source-image-uri: localhost/${{ inputs.product-name }}:${{ steps.build.outputs.image-manifest-tag }} + + publish_manifests: + name: Build/Publish ${{ matrix.versions }} Manifests + needs: [generate_matrix, build] + permissions: + id-token: write + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} + steps: + - name: Checkout Repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + persist-credentials: false + + - name: Publish and Sign Image Index Manifest to oci.stackable.tech + uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + with: + image-registry-uri: oci.stackable.tech + image-registry-username: robot$sdp+github-action-build + image-registry-password: ${{ secrets.harbor-robot-secret }} + image-repository: sdp/${{ inputs.product-name }} + image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ inputs.sdp-version }} + + notify: + name: Failure Notification + needs: [generate_matrix, build, publish_manifests] + runs-on: ubuntu-latest + if: failure() + steps: + - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 + with: + channel-id: "C07UG6JH44F" # notifications-container-images + payload: | + { + "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", + "attachments": [ + { + "pretext": "See the details below for a summary of which job(s) failed.", + "color": "#aa0000", + "fields": [ + { + "title": "Generate Version List", + "short": true, + "value": "${{ needs.generate_matrix.result }}" + }, + { + "title": "Build/Publish Image", + "short": true, + "value": "${{ needs.build.result }}" + }, + { + "title": "Build/Publish Manifests", + "short": true, + "value": "${{ needs.publish_manifests.result }}" + } + ], + "actions": [ + { + "type": "button", + "text": "Go to workflow run", + "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" + } + ] + } + ] + } + env: + SLACK_BOT_TOKEN: ${{ secrets.slack-token }} From 5b72bef088a66bf79f40604ac00aa6727744da8f Mon Sep 17 00:00:00 2001 From: Techassi Date: Mon, 14 Apr 2025 11:33:39 +0200 Subject: [PATCH 3/5] ci(airflow): Migrate build workflow to reusable workflow --- .github/workflows/build_airflow.yaml | 157 ++------------------------- 1 file changed, 10 insertions(+), 147 deletions(-) diff --git a/.github/workflows/build_airflow.yaml b/.github/workflows/build_airflow.yaml index 246d16f57..a318f62ed 100644 --- a/.github/workflows/build_airflow.yaml +++ b/.github/workflows/build_airflow.yaml @@ -3,10 +3,6 @@ name: Build Airflow run-name: | Build Airflow (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: airflow - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -22,148 +18,15 @@ on: - stackable-base/** - .github/actions/** - .github/workflows/build_airflow.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Build image using reusable workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: airflow + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} From 37b3e393a67cd83b223f92bf84830d2fa29e8cb0 Mon Sep 17 00:00:00 2001 From: Techassi Date: Mon, 14 Apr 2025 11:35:43 +0200 Subject: [PATCH 4/5] ci: Bump actions in reusable workflow --- .github/workflows/reusable_build_image.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable_build_image.yaml b/.github/workflows/reusable_build_image.yaml index 8b55355cd..ed226d60e 100644 --- a/.github/workflows/reusable_build_image.yaml +++ b/.github/workflows/reusable_build_image.yaml @@ -24,7 +24,7 @@ jobs: with: persist-credentials: false - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + uses: stackabletech/actions/shard@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0 with: product-name: ${{ inputs.product-name }} outputs: @@ -50,18 +50,18 @@ jobs: persist-credentials: false - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + uses: stackabletech/actions/free-disk-space@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0 - name: Build Product Image id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + uses: stackabletech/actions/build-product-image@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0 with: product-name: ${{ inputs.product-name }} product-version: ${{ matrix.versions }} sdp-version: ${{ inputs.sdp-version }} - name: Publish Container Image on oci.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + uses: stackabletech/actions/publish-image@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0 with: image-registry-uri: oci.stackable.tech image-registry-username: robot$sdp+github-action-build @@ -87,7 +87,7 @@ jobs: persist-credentials: false - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 + uses: stackabletech/actions/publish-index-manifest@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0 with: image-registry-uri: oci.stackable.tech image-registry-username: robot$sdp+github-action-build From 1442e86401947f4498bc6e0c4aa375f321d140e2 Mon Sep 17 00:00:00 2001 From: Techassi Date: Mon, 14 Apr 2025 12:32:42 +0200 Subject: [PATCH 5/5] ci: Migrate all products/tools to reusable workflow --- .github/workflows/build_airflow.yaml | 2 +- .github/workflows/build_druid.yaml | 157 ++---------------- .github/workflows/build_hadoop.yaml | 157 ++---------------- .github/workflows/build_hbase.yaml | 157 ++---------------- .github/workflows/build_hello-world.yaml | 157 ++---------------- .github/workflows/build_hive.yaml | 157 ++---------------- .github/workflows/build_java-base.yaml | 157 ++---------------- .github/workflows/build_java-devel.yaml | 157 ++---------------- .../workflows/build_kafka-testing-tools.yaml | 157 ++---------------- .github/workflows/build_kafka.yaml | 157 ++---------------- .github/workflows/build_kcat.yaml | 157 ++---------------- .github/workflows/build_krb5.yaml | 157 ++---------------- .github/workflows/build_nifi.yaml | 157 ++---------------- .github/workflows/build_omid.yaml | 157 ++---------------- .github/workflows/build_opa.yaml | 157 ++---------------- .../workflows/build_spark-connect-client.yaml | 157 ++---------------- .github/workflows/build_spark-k8s.yaml | 157 ++---------------- .github/workflows/build_stackable-base.yaml | 157 ++---------------- .github/workflows/build_superset.yaml | 157 ++---------------- .github/workflows/build_testing-tools.yaml | 157 ++---------------- .github/workflows/build_tools.yaml | 157 ++---------------- .github/workflows/build_trino-cli.yaml | 157 ++---------------- .github/workflows/build_trino.yaml | 157 ++---------------- .github/workflows/build_vector.yaml | 157 ++---------------- .github/workflows/build_zookeeper.yaml | 157 ++---------------- 25 files changed, 241 insertions(+), 3529 deletions(-) diff --git a/.github/workflows/build_airflow.yaml b/.github/workflows/build_airflow.yaml index a318f62ed..bc53a8907 100644 --- a/.github/workflows/build_airflow.yaml +++ b/.github/workflows/build_airflow.yaml @@ -22,7 +22,7 @@ on: jobs: build_image: - name: Build image using reusable workflow + name: Reusable Workflow uses: ./.github/workflows/reusable_build_image.yaml secrets: harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} diff --git a/.github/workflows/build_druid.yaml b/.github/workflows/build_druid.yaml index 3f4a3b9e4..424b74bb8 100644 --- a/.github/workflows/build_druid.yaml +++ b/.github/workflows/build_druid.yaml @@ -3,10 +3,6 @@ name: Build Druid run-name: | Build Druid (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: druid - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -24,148 +20,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_druid.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: druid + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_hadoop.yaml b/.github/workflows/build_hadoop.yaml index d3453bb86..2a77fb2e9 100644 --- a/.github/workflows/build_hadoop.yaml +++ b/.github/workflows/build_hadoop.yaml @@ -3,10 +3,6 @@ name: Build Hadoop run-name: | Build Hadoop (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: hadoop - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -24,148 +20,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_hadoop.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: hadoop + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_hbase.yaml b/.github/workflows/build_hbase.yaml index b1d1e0d79..9e8b1cb95 100644 --- a/.github/workflows/build_hbase.yaml +++ b/.github/workflows/build_hbase.yaml @@ -3,10 +3,6 @@ name: Build HBase run-name: | Build HBase (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: hbase - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -25,148 +21,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_hbase.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: hbase + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_hello-world.yaml b/.github/workflows/build_hello-world.yaml index 004d57ab3..0a5bf28c5 100644 --- a/.github/workflows/build_hello-world.yaml +++ b/.github/workflows/build_hello-world.yaml @@ -3,10 +3,6 @@ name: Build Hello-World run-name: | Build Hello-World (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: hello-world - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -20,148 +16,15 @@ on: - hello-world/** - .github/actions/** - .github/workflows/build_hello-world.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: hello-world + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_hive.yaml b/.github/workflows/build_hive.yaml index 0cea73c37..a13f26be8 100644 --- a/.github/workflows/build_hive.yaml +++ b/.github/workflows/build_hive.yaml @@ -3,10 +3,6 @@ name: Build Hive run-name: | Build Hive (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: hive - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -25,148 +21,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_hive.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: hive + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_java-base.yaml b/.github/workflows/build_java-base.yaml index 9e56d808f..07795d94c 100644 --- a/.github/workflows/build_java-base.yaml +++ b/.github/workflows/build_java-base.yaml @@ -3,10 +3,6 @@ name: Build Java Base run-name: | Build Java Base (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: java-base - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -20,148 +16,15 @@ on: - java-base/** - .github/actions/** - .github/workflows/build_java-base.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: java-base + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_java-devel.yaml b/.github/workflows/build_java-devel.yaml index 571fa60e1..78eaab939 100644 --- a/.github/workflows/build_java-devel.yaml +++ b/.github/workflows/build_java-devel.yaml @@ -3,10 +3,6 @@ name: Build Java Development run-name: | Build Java Development (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: java-devel - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -20,148 +16,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_java-devel.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: java-devel + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_kafka-testing-tools.yaml b/.github/workflows/build_kafka-testing-tools.yaml index c5d4bc26c..881e6bc56 100644 --- a/.github/workflows/build_kafka-testing-tools.yaml +++ b/.github/workflows/build_kafka-testing-tools.yaml @@ -3,10 +3,6 @@ name: Build Kafka Testing Tools run-name: | Build Kafka Testing Tools (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: kafka-testing-tools - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -24,148 +20,15 @@ on: - java-base/** - .github/actions/** - .github/workflows/build_kafka-testing-tools.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: kafka-testing-tools + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_kafka.yaml b/.github/workflows/build_kafka.yaml index 413560642..b3e2434e2 100644 --- a/.github/workflows/build_kafka.yaml +++ b/.github/workflows/build_kafka.yaml @@ -3,10 +3,6 @@ name: Build Kafka run-name: | Build Kafka (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: kafka - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -26,148 +22,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_kafka.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: kafka + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_kcat.yaml b/.github/workflows/build_kcat.yaml index bed9f8a43..431e673fc 100644 --- a/.github/workflows/build_kcat.yaml +++ b/.github/workflows/build_kcat.yaml @@ -3,10 +3,6 @@ name: Build kcat run-name: | Build kcat (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: kcat - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -24,148 +20,15 @@ on: - java-base/** - .github/actions/** - .github/workflows/build_kcat.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: kcat + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_krb5.yaml b/.github/workflows/build_krb5.yaml index aec2bd8e0..443fbdeb6 100644 --- a/.github/workflows/build_krb5.yaml +++ b/.github/workflows/build_krb5.yaml @@ -3,10 +3,6 @@ name: Build Krb5 run-name: | Build Krb5 (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: krb5 - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -20,148 +16,15 @@ on: - krb5/** - .github/actions/** - .github/workflows/build_krb5.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: krb5 + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_nifi.yaml b/.github/workflows/build_nifi.yaml index c1a275d7d..d13e76eab 100644 --- a/.github/workflows/build_nifi.yaml +++ b/.github/workflows/build_nifi.yaml @@ -3,10 +3,6 @@ name: Build NiFi run-name: | Build NiFi (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: nifi - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -24,148 +20,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_nifi.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: nifi + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_omid.yaml b/.github/workflows/build_omid.yaml index a3382623a..b88a685d8 100644 --- a/.github/workflows/build_omid.yaml +++ b/.github/workflows/build_omid.yaml @@ -3,10 +3,6 @@ name: Build Omid run-name: | Build Omid (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: omid - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -24,148 +20,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_omid.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: omid + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_opa.yaml b/.github/workflows/build_opa.yaml index 117261701..17c516a6a 100644 --- a/.github/workflows/build_opa.yaml +++ b/.github/workflows/build_opa.yaml @@ -3,10 +3,6 @@ name: Build OPA run-name: | Build OPA (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: opa - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -22,148 +18,15 @@ on: - stackable-base/** - .github/actions/** - .github/workflows/build_opa.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: opa + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_spark-connect-client.yaml b/.github/workflows/build_spark-connect-client.yaml index 7fdd29858..f3f25879d 100644 --- a/.github/workflows/build_spark-connect-client.yaml +++ b/.github/workflows/build_spark-connect-client.yaml @@ -3,10 +3,6 @@ name: Build Spark Connect Client run-name: | Build Spark Connect Client (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: spark-connect-client - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -23,148 +19,15 @@ on: - java-base/** - .github/actions/** - .github/workflows/build_spark-connect-client.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: spark-connect-client + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_spark-k8s.yaml b/.github/workflows/build_spark-k8s.yaml index f69bbc5c1..f9886f7f9 100644 --- a/.github/workflows/build_spark-k8s.yaml +++ b/.github/workflows/build_spark-k8s.yaml @@ -3,10 +3,6 @@ name: Build Spark K8s run-name: | Build Spark K8s (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: spark-k8s - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -25,148 +21,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_spark-k8s.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: spark-k8s + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_stackable-base.yaml b/.github/workflows/build_stackable-base.yaml index 778cd0a21..502ef66af 100644 --- a/.github/workflows/build_stackable-base.yaml +++ b/.github/workflows/build_stackable-base.yaml @@ -3,10 +3,6 @@ name: Build Stackable Base run-name: | Build Stackable Base (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: stackable-base - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -21,148 +17,15 @@ on: - tools/** - .github/actions/** - .github/workflows/build_stackable-base.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: stackable-base + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_superset.yaml b/.github/workflows/build_superset.yaml index a0b8f763f..ac181c8b7 100644 --- a/.github/workflows/build_superset.yaml +++ b/.github/workflows/build_superset.yaml @@ -3,10 +3,6 @@ name: Build Superset run-name: | Build Superset (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: superset - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -22,148 +18,15 @@ on: - stackable-base/** - .github/actions/** - .github/workflows/build_superset.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: superset + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_testing-tools.yaml b/.github/workflows/build_testing-tools.yaml index c5cf477e4..42cd701cc 100644 --- a/.github/workflows/build_testing-tools.yaml +++ b/.github/workflows/build_testing-tools.yaml @@ -3,10 +3,6 @@ name: Build Testing Tools run-name: | Build Testing Tools (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: testing-tools - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -20,148 +16,15 @@ on: - testing-tools/** - .github/actions/** - .github/workflows/build_testing-tools.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: testing-tools + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_tools.yaml b/.github/workflows/build_tools.yaml index 015c75655..34ed34f84 100644 --- a/.github/workflows/build_tools.yaml +++ b/.github/workflows/build_tools.yaml @@ -3,10 +3,6 @@ name: Build Tools run-name: | Build Tools (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: tools - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -21,148 +17,15 @@ on: - stackable-base/** - .github/actions/** - .github/workflows/build_tools.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: tools + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_trino-cli.yaml b/.github/workflows/build_trino-cli.yaml index 5a3ebfb93..e28f10b2e 100644 --- a/.github/workflows/build_trino-cli.yaml +++ b/.github/workflows/build_trino-cli.yaml @@ -3,10 +3,6 @@ name: Build Trino CLI run-name: | Build Trino CLI (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: trino-cli - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -23,148 +19,15 @@ on: - java-base/** - .github/actions/** - .github/workflows/build_trino-cli.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: trino-cli + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_trino.yaml b/.github/workflows/build_trino.yaml index 1638b55e7..850234033 100644 --- a/.github/workflows/build_trino.yaml +++ b/.github/workflows/build_trino.yaml @@ -3,10 +3,6 @@ name: Build Trino run-name: | Build Trino (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: trino - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -24,148 +20,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_trino.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: trino + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_vector.yaml b/.github/workflows/build_vector.yaml index 51960606f..2d237f771 100644 --- a/.github/workflows/build_vector.yaml +++ b/.github/workflows/build_vector.yaml @@ -3,10 +3,6 @@ name: Build Vector run-name: | Build Vector (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: vector - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -20,148 +16,15 @@ on: - vector/** - .github/actions/** - .github/workflows/build_vector.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: vector + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} diff --git a/.github/workflows/build_zookeeper.yaml b/.github/workflows/build_zookeeper.yaml index b8545e189..e761eb0da 100644 --- a/.github/workflows/build_zookeeper.yaml +++ b/.github/workflows/build_zookeeper.yaml @@ -3,10 +3,6 @@ name: Build ZooKeeper run-name: | Build ZooKeeper (attempt #${{ github.run_attempt }}) -env: - PRODUCT_NAME: zookeeper - SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} - on: workflow_dispatch: schedule: @@ -24,148 +20,15 @@ on: - java-devel/** - .github/actions/** - .github/workflows/build_zookeeper.yaml + - .github/workflows/reusable_build_image.yaml jobs: - generate_matrix: - name: Generate Version List - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - id: shard - uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - outputs: - versions: ${{ steps.shard.outputs.versions }} - - build: - name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image - needs: [generate_matrix] - permissions: - id-token: write - runs-on: ${{ matrix.runner.name }} - strategy: - fail-fast: false - matrix: - runner: - - {name: "ubuntu-latest", arch: "amd64"} - - {name: "ubicloud-standard-8-arm", arch: "arm64"} - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Free Disk Space - uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - - - name: Build Product Image - id: build - uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - product-name: ${{ env.PRODUCT_NAME }} - product-version: ${{ matrix.versions }} - sdp-version: ${{ env.SDP_VERSION }} - - - name: Publish Container Image on docker.stackable.tech - uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - 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@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} - - publish_manifests: - name: Build/Publish ${{ matrix.versions }} Manifests - needs: [generate_matrix, build] - permissions: - id-token: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} - steps: - - name: Checkout Repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - persist-credentials: false - - - name: Publish and Sign Image Index Manifest to docker.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: docker.stackable.tech - image-registry-username: github - image-registry-password: ${{ secrets.NEXUS_PASSWORD }} - image-repository: stackable/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - - name: Publish and Sign Image Index Manifest to oci.stackable.tech - uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0 - with: - image-registry-uri: oci.stackable.tech - image-registry-username: robot$sdp+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} - image-repository: sdp/${{ env.PRODUCT_NAME }} - image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} - - notify: - name: Failure Notification - needs: [generate_matrix, build, publish_manifests] - runs-on: ubuntu-latest - if: failure() - steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 - with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Generate Version List", - "short": true, - "value": "${{ needs.generate_matrix.result }}" - }, - { - "title": "Build/Publish Image", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Build/Publish Manifests", - "short": true, - "value": "${{ needs.publish_manifests.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + build_image: + name: Reusable Workflow + uses: ./.github/workflows/reusable_build_image.yaml + secrets: + harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + with: + product-name: zookeeper + sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}