Skip to content

Commit 7768782

Browse files
adamanciniclaude
andcommitted
add helm install test job to validate customer deployment
Adds new helm-install-test job that performs end-to-end testing by: - Logging into registry.replicated.com as a customer using email and license ID - Running task helm-install with replicated helmfile environment - Validating the complete customer deployment workflow Depends on create-customer-and-cluster job and uses customer credentials for authentication. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 03f7c83 commit 7768782

File tree

1 file changed

+62
-4
lines changed

1 file changed

+62
-4
lines changed

.github/workflows/wg-easy-pr-validation.yaml

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
APP_DIR: applications/wg-easy
1919

2020
jobs:
21-
task-validation:
21+
build-release:
2222
runs-on: ubuntu-22.04
2323
defaults:
2424
run:
@@ -31,7 +31,7 @@ jobs:
3131
- dependencies-update
3232
# - helm-preflight
3333
- release-prepare
34-
- clean
34+
# - clean
3535

3636
steps:
3737
- name: Checkout code
@@ -163,7 +163,7 @@ jobs:
163163

164164
replicated-release:
165165
runs-on: ubuntu-22.04
166-
needs: task-validation
166+
needs: build-release
167167
defaults:
168168
run:
169169
working-directory: ${{ env.APP_DIR }}
@@ -217,7 +217,7 @@ jobs:
217217
REPLICATED_API_TOKEN: ${{ secrets.WG_EASY_REPLICATED_API_TOKEN }}
218218
REPLICATED_APP: ${{ secrets.WG_EASY_REPLICATED_APP }}
219219

220-
create-customer:
220+
create-customer-and-cluster:
221221
runs-on: ubuntu-22.04
222222
needs: replicated-release
223223
defaults:
@@ -256,3 +256,61 @@ jobs:
256256
REPLICATED_API_TOKEN: ${{ secrets.WG_EASY_REPLICATED_API_TOKEN }}
257257
REPLICATED_APP: ${{ secrets.WG_EASY_REPLICATED_APP }}
258258

259+
helm-install-test:
260+
runs-on: ubuntu-22.04
261+
needs: create-customer-and-cluster
262+
defaults:
263+
run:
264+
working-directory: ${{ env.APP_DIR }}
265+
266+
steps:
267+
- name: Checkout code
268+
uses: actions/checkout@v4
269+
270+
- name: Setup Helm
271+
uses: azure/setup-helm@v4
272+
with:
273+
version: '3.17.3'
274+
275+
- name: Setup Task
276+
uses: arduino/setup-task@v2
277+
with:
278+
version: 3.x
279+
repo-token: ${{ secrets.GITHUB_TOKEN }}
280+
281+
- name: Install Replicated CLI
282+
run: task utils:install-replicated-cli
283+
284+
- name: Helm registry login
285+
run: |
286+
BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
287+
CUSTOMER_EMAIL="${{ secrets.WG_EASY_CUSTOMER_EMAIL }}"
288+
289+
# Get customer license ID from previous step
290+
LICENSE_ID=$(task customer-get-license CUSTOMER_NAME="$BRANCH_NAME" | grep -o '[A-Za-z0-9]\{27\}' | head -1)
291+
292+
# Login to Replicated registry
293+
helm registry login registry.replicated.com --username "$CUSTOMER_EMAIL" --password "$LICENSE_ID"
294+
timeout-minutes: 5
295+
env:
296+
REPLICATED_API_TOKEN: ${{ secrets.WG_EASY_REPLICATED_API_TOKEN }}
297+
REPLICATED_APP: ${{ secrets.WG_EASY_REPLICATED_APP }}
298+
299+
- name: Helm install as customer
300+
run: |
301+
BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
302+
CHANNEL_NAME=$(echo "$BRANCH_NAME" | tr '[:upper:]' '[:lower:]')
303+
304+
# Get customer license ID
305+
LICENSE_ID=$(task customer-get-license CUSTOMER_NAME="$BRANCH_NAME" | grep -o '[A-Za-z0-9]\{27\}' | head -1)
306+
307+
# Use taskfile helm-install with replicated helmfile environment
308+
task helm-install
309+
timeout-minutes: 10
310+
env:
311+
REPLICATED_API_TOKEN: ${{ secrets.WG_EASY_REPLICATED_API_TOKEN }}
312+
REPLICATED_APP: ${{ secrets.WG_EASY_REPLICATED_APP }}
313+
CHANNEL: $CHANNEL_NAME
314+
REPLICATED_LICENSE_ID: $LICENSE_ID
315+
HELM_ENV: replicated
316+

0 commit comments

Comments
 (0)