-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (48 loc) · 2.18 KB
/
pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: On Pull Request to Main
on:
pull_request:
branches:
- main
jobs:
validate-changes:
if: '!github.event.pull_request.head.repo.fork'
runs-on: ubuntu-22.04
strategy:
matrix:
repo_name: [quickstart-openshift, pubcode, onroutebc]
include:
- repo_name: quickstart-openshift
params: --set global.autoscaling=false --set-string global.repository=bcgov/quickstart-openshift --set-string backend.containers[0].tag=test --set-string backend.initContainers[0].tag=test --set-string frontend.containers[0].tag=test --set-string global.secrets.databasePassword=test --set-string global.secrets.databaseUser=test --set-string global.secrets.databasePassword=databaseName --values values.yaml
- repo_name: pubcode
params: --set global.autoscaling=false --set-string global.repository=bcgov/pubcode --values values.yaml
- repo_name: onroutebc
params: --set global.autoscaling=false --set-string global.repository=bcgov/onroutebc --set-string global.tag=test --set-string global.license=test --set-string global.zone=helm-test --set-string global.vault.role=vault-abc --values values.yaml
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
with:
path: ./helm-service
- uses: actions/checkout@v4
with:
repository: bcgov/${{ matrix.repo_name }}
ref: main
path: ./${{ matrix.repo_name }}
- name: Add Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
run: |
cd ./helm-service/util
npm ci
- name: Execute Program
run: |
DESTINATION_REPO=${{ matrix.repo_name }} node ./helm-service/util/index.js
- name: Validate Changes
shell: bash
run: |
oc login --token=${{ secrets.oc_token }} --server=${{ vars.oc_server }}
oc project ${{ vars.OC_NAMESPACE }} # Safeguard!
cd ./${{ matrix.repo_name }}/charts/${{ matrix.repo_name }}
helm dependency update
helm install --dry-run ${{ matrix.repo_name }}-test-helm-update --debug ${{ matrix.params }} .