diff --git a/.github/workflows/smoke-build.yaml b/.github/workflows/smoke-build.yaml index 1ae35f1..c03e9ae 100644 --- a/.github/workflows/smoke-build.yaml +++ b/.github/workflows/smoke-build.yaml @@ -16,7 +16,7 @@ on: - smoke/* jobs: - generate_matrix: + generate-matrix: name: Generate Version List runs-on: ubuntu-latest steps: @@ -27,14 +27,13 @@ jobs: - id: shard uses: ./shard with: - product-name: smoke - boil-version: 0.1.0 + product-name: smoke/container-image outputs: versions: ${{ steps.shard.outputs.versions }} - build: + build-container-image: name: Build/Publish Smoke Test (${{ matrix.versions }}-${{ matrix.runner.arch }}) Image - needs: [generate_matrix] + needs: [generate-matrix] permissions: id-token: write runs-on: ${{ matrix.runner.name }} @@ -45,7 +44,7 @@ jobs: # We therefore explicitly request 24.04 for them as well. - { name: "ubuntu-latest", arch: "amd64" } - { name: "ubicloud-standard-8-arm-ubuntu-2404", arch: "arm64" } - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} + versions: ${{ fromJson(needs.generate-matrix.outputs.versions) }} steps: - name: Checkout Repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -60,31 +59,31 @@ jobs: uses: ./build-product-image with: product-version: ${{ matrix.versions }} - boil-config-file: smoke/boil.toml + boil-config-file: smoke/container-image/boil.toml boil-version: latest - registry-namespace: stackable + registry-namespace: smoke extra-tag-data: pr-321 - product-name: smoke + product-name: smoke/container-image - name: Publish Container Image on oci.stackable.tech uses: ./publish-image with: image-registry-uri: oci.stackable.tech - image-registry-username: robot$stackable+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }} - image-repository: stackable/smoke + image-registry-username: robot$smoke+github-action-build + image-registry-password: ${{ secrets.HARBOR_ROBOT_SMOKE_GITHUB_ACTION_BUILD_SECRET }} + image-repository: smoke/container-image image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }} - source-image-uri: localhost/stackable/smoke:${{ steps.build.outputs.image-manifest-tag }} + source-image-uri: localhost/smoke/smoke/container-image:${{ steps.build.outputs.image-manifest-tag }} - publish_manifests: + publish-manifests: name: Build/Publish ${{ matrix.versions }} Index Manifest - needs: [generate_matrix, build] + needs: [generate-matrix, build-container-image] permissions: id-token: write runs-on: ubuntu-latest strategy: matrix: - versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }} + versions: ${{ fromJson(needs.generate-matrix.outputs.versions) }} steps: - name: Checkout Repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -95,14 +94,45 @@ jobs: uses: ./publish-image-index-manifest with: image-registry-uri: oci.stackable.tech - image-registry-username: robot$stackable+github-action-build - image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }} - image-repository: stackable/smoke - image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev + image-registry-username: robot$smoke+github-action-build + image-registry-password: ${{ secrets.HARBOR_ROBOT_SMOKE_GITHUB_ACTION_BUILD_SECRET }} + image-repository: smoke/container-image + image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev-pr-321 + + publish-helm-chart: + name: Package/Publish ${{ matrix.versions }} Helm Chart + needs: [generate-matrix, build-container-image] + permissions: + id-token: write + runs-on: ubuntu-latest + strategy: + matrix: + versions: ${{ fromJson(needs.generate-matrix.outputs.versions) }} + steps: + - name: Checkout Repository + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + submodules: recursive + + - name: Package, Publish, and Sign Helm Chart + uses: ./publish-helm-chart + with: + chart-registry-uri: oci.stackable.tech + chart-registry-username: robot$smoke+github-action-build + chart-registry-password: ${{ secrets.HARBOR_ROBOT_SMOKE_GITHUB_ACTION_BUILD_SECRET }} + chart-repository: smoke + chart-directory: smoke/helm-chart + chart-version: ${{ matrix.versions }} + app-version: ${{ matrix.versions }} notify: name: Failure Notification - needs: [generate_matrix, build, publish_manifests] + needs: + - generate-matrix + - build-container-image + - publish-helm-chart + - publish-manifests runs-on: ubuntu-latest if: failure() || github.run_attempt > 1 steps: @@ -114,8 +144,9 @@ jobs: - name: Send Notification uses: ./send-slack-notification with: - publish-manifests-result: ${{ needs.publish_manifests.result }} - build-result: ${{ needs.build.result }} + publish-helm-chart-result: ${{ needs.publish-helm-chart.result }} + publish-manifests-result: ${{ needs.publish-manifests.result }} + build-result: ${{ needs.build-container-image.result }} slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} channel-id: C07UG6JH44F # notifications-container-images type: container-image-build diff --git a/publish-helm-chart/action.yaml b/publish-helm-chart/action.yaml index d2f7394..51b9022 100644 --- a/publish-helm-chart/action.yaml +++ b/publish-helm-chart/action.yaml @@ -37,6 +37,7 @@ runs: env: HELM_VERSION: ${{ inputs.helm-version }} GITHUB_DEBUG: ${{ runner.debug }} + VERIFY_SIGNATURE: "false" shell: bash run: "$GITHUB_ACTION_PATH/../.scripts/actions/install_helm.sh" diff --git a/send-slack-notification/README.md b/send-slack-notification/README.md index 6403478..e9dc6e5 100644 --- a/send-slack-notification/README.md +++ b/send-slack-notification/README.md @@ -16,7 +16,7 @@ Currently, two types of notifications are supported. jobs: notify: name: Failure Notification - needs: [job_1, job_2] + needs: [job_1, job_2, job_3] runs-on: ubuntu-latest if: failure() || github.run_attempt > 1 steps: @@ -26,6 +26,7 @@ jobs: type: container-image-build channel-id: DEADBEEF build-result: ${{ needs.job_1.result }} + publish-helm-chart-result: ${{ needs.job_3.result }} publish-manifests-result: ${{ needs.job_2.result }} slack-token: ${{ secrets.MY_SECRET }} ``` @@ -63,6 +64,7 @@ jobs: - `slack-token` (required) - `build-result` (optional, e.g. `success`) - `publish-manifests-result` (optional, e.g. `failure`) +- `publish-helm-chart-result` (optional, e.g. `failure`) ### Outputs diff --git a/smoke/Dockerfile b/smoke/container-image/Dockerfile similarity index 100% rename from smoke/Dockerfile rename to smoke/container-image/Dockerfile diff --git a/smoke/boil-config.toml b/smoke/container-image/boil-config.toml similarity index 100% rename from smoke/boil-config.toml rename to smoke/container-image/boil-config.toml diff --git a/smoke/boil.toml b/smoke/container-image/boil.toml similarity index 100% rename from smoke/boil.toml rename to smoke/container-image/boil.toml diff --git a/smoke/helm-chart/Chart.yaml b/smoke/helm-chart/Chart.yaml new file mode 100644 index 0000000..2014c6b --- /dev/null +++ b/smoke/helm-chart/Chart.yaml @@ -0,0 +1,4 @@ +--- +apiVersion: v2 +name: helm-chart +version: "0.0.0-dev"