Skip to content

Commit 29bea1b

Browse files
authored
test(smoke): Add Helm chart workflow test (#89)
* test(smoke): Move smoke containerfile * test(smoke): Use correct product name * test(smoke): Add Helm Chart testing * chore: Checkout repo * ci(smoke): Don't verify Helm binary signature * ci: Actually use the correct robot acount, duh * ci: Use correct registry paths * ci: Push smoke container image to smoke repository * ci: Adjust source image URI * ci: Add extra tag data * ci: Re-add notify job * ci(smoke): Pass publish-helm-chart-result * docs(send-slack-notification): Add missing input
1 parent 2eadde5 commit 29bea1b

File tree

7 files changed

+62
-24
lines changed

7 files changed

+62
-24
lines changed

.github/workflows/smoke-build.yaml

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
- smoke/*
1717

1818
jobs:
19-
generate_matrix:
19+
generate-matrix:
2020
name: Generate Version List
2121
runs-on: ubuntu-latest
2222
steps:
@@ -27,14 +27,13 @@ jobs:
2727
- id: shard
2828
uses: ./shard
2929
with:
30-
product-name: smoke
31-
boil-version: 0.1.0
30+
product-name: smoke/container-image
3231
outputs:
3332
versions: ${{ steps.shard.outputs.versions }}
3433

35-
build:
34+
build-container-image:
3635
name: Build/Publish Smoke Test (${{ matrix.versions }}-${{ matrix.runner.arch }}) Image
37-
needs: [generate_matrix]
36+
needs: [generate-matrix]
3837
permissions:
3938
id-token: write
4039
runs-on: ${{ matrix.runner.name }}
@@ -45,7 +44,7 @@ jobs:
4544
# We therefore explicitly request 24.04 for them as well.
4645
- { name: "ubuntu-latest", arch: "amd64" }
4746
- { name: "ubicloud-standard-8-arm-ubuntu-2404", arch: "arm64" }
48-
versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }}
47+
versions: ${{ fromJson(needs.generate-matrix.outputs.versions) }}
4948
steps:
5049
- name: Checkout Repository
5150
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -60,31 +59,31 @@ jobs:
6059
uses: ./build-product-image
6160
with:
6261
product-version: ${{ matrix.versions }}
63-
boil-config-file: smoke/boil.toml
62+
boil-config-file: smoke/container-image/boil.toml
6463
boil-version: latest
65-
registry-namespace: stackable
64+
registry-namespace: smoke
6665
extra-tag-data: pr-321
67-
product-name: smoke
66+
product-name: smoke/container-image
6867

6968
- name: Publish Container Image on oci.stackable.tech
7069
uses: ./publish-image
7170
with:
7271
image-registry-uri: oci.stackable.tech
73-
image-registry-username: robot$stackable+github-action-build
74-
image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }}
75-
image-repository: stackable/smoke
72+
image-registry-username: robot$smoke+github-action-build
73+
image-registry-password: ${{ secrets.HARBOR_ROBOT_SMOKE_GITHUB_ACTION_BUILD_SECRET }}
74+
image-repository: smoke/container-image
7675
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
77-
source-image-uri: localhost/stackable/smoke:${{ steps.build.outputs.image-manifest-tag }}
76+
source-image-uri: localhost/smoke/smoke/container-image:${{ steps.build.outputs.image-manifest-tag }}
7877

79-
publish_manifests:
78+
publish-manifests:
8079
name: Build/Publish ${{ matrix.versions }} Index Manifest
81-
needs: [generate_matrix, build]
80+
needs: [generate-matrix, build-container-image]
8281
permissions:
8382
id-token: write
8483
runs-on: ubuntu-latest
8584
strategy:
8685
matrix:
87-
versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }}
86+
versions: ${{ fromJson(needs.generate-matrix.outputs.versions) }}
8887
steps:
8988
- name: Checkout Repository
9089
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -95,14 +94,45 @@ jobs:
9594
uses: ./publish-image-index-manifest
9695
with:
9796
image-registry-uri: oci.stackable.tech
98-
image-registry-username: robot$stackable+github-action-build
99-
image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }}
100-
image-repository: stackable/smoke
101-
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev
97+
image-registry-username: robot$smoke+github-action-build
98+
image-registry-password: ${{ secrets.HARBOR_ROBOT_SMOKE_GITHUB_ACTION_BUILD_SECRET }}
99+
image-repository: smoke/container-image
100+
image-index-manifest-tag: ${{ matrix.versions }}-stackable0.0.0-dev-pr-321
101+
102+
publish-helm-chart:
103+
name: Package/Publish ${{ matrix.versions }} Helm Chart
104+
needs: [generate-matrix, build-container-image]
105+
permissions:
106+
id-token: write
107+
runs-on: ubuntu-latest
108+
strategy:
109+
matrix:
110+
versions: ${{ fromJson(needs.generate-matrix.outputs.versions) }}
111+
steps:
112+
- name: Checkout Repository
113+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
114+
with:
115+
persist-credentials: false
116+
submodules: recursive
117+
118+
- name: Package, Publish, and Sign Helm Chart
119+
uses: ./publish-helm-chart
120+
with:
121+
chart-registry-uri: oci.stackable.tech
122+
chart-registry-username: robot$smoke+github-action-build
123+
chart-registry-password: ${{ secrets.HARBOR_ROBOT_SMOKE_GITHUB_ACTION_BUILD_SECRET }}
124+
chart-repository: smoke
125+
chart-directory: smoke/helm-chart
126+
chart-version: ${{ matrix.versions }}
127+
app-version: ${{ matrix.versions }}
102128

103129
notify:
104130
name: Failure Notification
105-
needs: [generate_matrix, build, publish_manifests]
131+
needs:
132+
- generate-matrix
133+
- build-container-image
134+
- publish-helm-chart
135+
- publish-manifests
106136
runs-on: ubuntu-latest
107137
if: failure() || github.run_attempt > 1
108138
steps:
@@ -114,8 +144,9 @@ jobs:
114144
- name: Send Notification
115145
uses: ./send-slack-notification
116146
with:
117-
publish-manifests-result: ${{ needs.publish_manifests.result }}
118-
build-result: ${{ needs.build.result }}
147+
publish-helm-chart-result: ${{ needs.publish-helm-chart.result }}
148+
publish-manifests-result: ${{ needs.publish-manifests.result }}
149+
build-result: ${{ needs.build-container-image.result }}
119150
slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
120151
channel-id: C07UG6JH44F # notifications-container-images
121152
type: container-image-build

publish-helm-chart/action.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ runs:
3737
env:
3838
HELM_VERSION: ${{ inputs.helm-version }}
3939
GITHUB_DEBUG: ${{ runner.debug }}
40+
VERIFY_SIGNATURE: "false"
4041
shell: bash
4142
run: "$GITHUB_ACTION_PATH/../.scripts/actions/install_helm.sh"
4243

send-slack-notification/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Currently, two types of notifications are supported.
1616
jobs:
1717
notify:
1818
name: Failure Notification
19-
needs: [job_1, job_2]
19+
needs: [job_1, job_2, job_3]
2020
runs-on: ubuntu-latest
2121
if: failure() || github.run_attempt > 1
2222
steps:
@@ -26,6 +26,7 @@ jobs:
2626
type: container-image-build
2727
channel-id: DEADBEEF
2828
build-result: ${{ needs.job_1.result }}
29+
publish-helm-chart-result: ${{ needs.job_3.result }}
2930
publish-manifests-result: ${{ needs.job_2.result }}
3031
slack-token: ${{ secrets.MY_SECRET }}
3132
```
@@ -63,6 +64,7 @@ jobs:
6364
- `slack-token` (required)
6465
- `build-result` (optional, e.g. `success`)
6566
- `publish-manifests-result` (optional, e.g. `failure`)
67+
- `publish-helm-chart-result` (optional, e.g. `failure`)
6668

6769
### Outputs
6870

File renamed without changes.
File renamed without changes.
File renamed without changes.

smoke/helm-chart/Chart.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
apiVersion: v2
3+
name: helm-chart
4+
version: "0.0.0-dev"

0 commit comments

Comments
 (0)