Skip to content

Commit 61a9d73

Browse files
authored
feat: Integrate infrastructure repository into e2e process (#115)
1 parent 14910e5 commit 61a9d73

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

.github/workflows/deploy-and-e2e.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ on:
2222
required: false
2323
default: false
2424
type: boolean
25+
chart-branch:
26+
description: Helm chart version to deploy
27+
required: false
28+
default: 'develop'
2529
branch:
2630
description: e2e branch
2731
required: false
@@ -140,6 +144,7 @@ jobs:
140144
countryconfig-image-tag: ${{ github.event.client_payload.countryconfig-image-tag || inputs.countryconfig-image-tag }}
141145
environment: ${{ github.event.client_payload.stack || inputs.stack }}
142146
reset: ${{ github.event.client_payload.reset || inputs.reset || true }}
147+
chart-branch: ${{ github.event.client_payload.chart-branch || inputs.chart-branch }}
143148
keep-e2e: ${{ github.event.client_payload.keep-e2e == 'true' || github.event.client_payload.keep-e2e == true || inputs.keep-e2e || false }}
144149
secrets: inherit
145150
test:

.github/workflows/k8s-deploy.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
type: string
88
countryconfig-image-tag:
99
type: string
10+
chart-branch:
11+
type: string
1012
environment:
1113
type: string
1214
reset:
@@ -24,6 +26,10 @@ on:
2426
description: 'Tag of the countryconfig image'
2527
required: true
2628
default: 'develop'
29+
chart-branch:
30+
description: 'Helm chart version to deploy'
31+
required: false
32+
default: 'develop'
2733
environment:
2834
description: 'Target environment'
2935
required: true
@@ -47,9 +53,18 @@ jobs:
4753
COUNTRYCONFIG_IMAGE_TAG: ${{ inputs.countryconfig-image-tag }}
4854
runs-on: [self-hosted, k8s, e2e]
4955
steps:
50-
# FYI: Repository is needed only due to single file: examples/dev/opencrvs-services/values.yaml
5156
- name: Checkout repo
52-
uses: actions/checkout@v4
57+
uses: actions/checkout@v5
58+
# FIXME: Update to charts repository once available
59+
- name: Checkout infrastructure repository
60+
uses: actions/checkout@v5
61+
with:
62+
repository: opencrvs/infrastructure
63+
path: infrastructure
64+
ref: ${{ inputs.chart-branch }}
65+
- name: Verify branch status ${{ inputs.chart-branch }}
66+
working-directory: infrastructure
67+
run: git status
5368
- name: Generate summary
5469
run: |
5570
echo "Deploying environment to https://${{ inputs.environment }}.e2e-k8s.${{ vars.DOMAIN }}" >> $GITHUB_STEP_SUMMARY
@@ -98,7 +113,7 @@ jobs:
98113
sed -i -e "s#{{STACK}}#${ENV}#g" k8s-env/opencrvs/values.yaml
99114
- name: Deploy with Helm
100115
run: |
101-
helm upgrade --install opencrvs oci://ghcr.io/opencrvs/opencrvs-services:0.1.23 \
116+
helm upgrade --install opencrvs infrastructure/charts/opencrvs-services \
102117
--timeout 15m \
103118
--namespace "opencrvs-${ENV}" \
104119
-f k8s-env/opencrvs/values.yaml \
@@ -108,6 +123,9 @@ jobs:
108123
--set countryconfig.image.tag="$COUNTRYCONFIG_IMAGE_TAG" \
109124
--set hostname=$ENV.e2e-k8s.opencrvs.dev \
110125
--set environment="$ENV" 2>&1 | sed '/USER-SUPPLIED VALUES:/,$d'; exit ${PIPESTATUS[0]};
126+
- name: Get notes from Helm release
127+
run: |
128+
helm get notes opencrvs -n "opencrvs-${ENV}" || echo "No notes found"
111129
- name: Add keep namespace label opencrvs-${ENV}
112130
if: inputs.keep-e2e
113131
run: kubectl label namespace opencrvs-${ENV} keep_namespace='true' --overwrite

0 commit comments

Comments
 (0)