@@ -27,12 +27,29 @@ jobs:
2727 - k8s
2828 - ${{ inputs.environment }}
2929 steps :
30- - name : Get helm release values
31- run : helm get values opencrvs -n ${namespace} > ${namespace}.yaml
30+ - name : Get helm release values and Quote specific fields that are commonly numeric
31+ run : |
32+ helm get values opencrvs -n ${namespace} -ojson | \
33+ jq '
34+ # Quote image tags
35+ if has("image") and (.image | has("tag")) and (.image.tag | type == "number") then
36+ .image.tag = (.image.tag | tostring)
37+ else . end |
38+
39+ # Quote version numbers
40+ if has("version") and (.version | type == "number") then
41+ .version = (.version | tostring)
42+ else . end |
43+
44+ # Quote port numbers if needed (optional)
45+ if has("service") and (.service | has("port")) and (.service.port | type == "number") then
46+ .service.port = (.service.port | tostring)
47+ else . end
48+ ' > ${namespace}.json
3249 - name : Cleanup environment
3350 run : |
3451 kubectl delete job -n ${namespace} --ignore-not-found=true data-cleanup
35- helm template -f ${namespace}.yaml \
52+ helm template -f ${namespace}.json \
3653 --set data_cleanup.enabled=true \
3754 --namespace ${namespace} \
3855 -s templates/data-cleanup-job.yaml \
4562 - name : Re-run postgres on-deploy
4663 run : |
4764 kubectl delete job -n ${namespace} --ignore-not-found=true postgres-on-deploy;
48- helm template -f ${namespace}.yaml \
65+ helm template -f ${namespace}.json \
4966 -s templates/postgres-on-update.yaml \
5067 --namespace ${namespace} \
5168 oci://ghcr.io/opencrvs/opencrvs-services | kubectl apply -n ${namespace} --wait=true -f -;
6885 kubectl delete job -n ${namespace} --ignore-not-found=true data-seed
6986 kubectl delete pod -n ${namespace} -lapp=events;
7087 kubectl wait --for=condition=ready pod -n ${namespace} -lapp=events;
71- helm template -f ${namespace}.yaml \
88+ helm template -f ${namespace}.json \
7289 --set data_seed.enabled=true \
7390 --namespace ${namespace} \
7491 -s templates/data-seed-job.yaml \
0 commit comments