Skip to content

Commit e0f6cf4

Browse files
committed
ci: update patch
1 parent 3277e11 commit e0f6cf4

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

.github/workflows/previews-ods-ui.yaml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,29 +43,16 @@ jobs:
4343
working-directory: ./opendata.swiss/ui/k8s
4444
run: |
4545
kustomize edit set nameprefix "${{ steps.vars.outputs.branch }}-"
46-
kustomize edit add patch --patch "$(cat <<EOF
47-
apiVersion: networking.k8s.io/v1
48-
kind: Ingress
49-
metadata:
50-
name: piveau-ui
51-
spec:
52-
tls:
53-
- secretName: ${{ steps.vars.outputs.branch }}-prev-tls
54-
hosts:
55-
- ${{ steps.vars.outputs.branch }}.piveau-ln-preview.zazukoians.org
56-
rules:
57-
- host: ${{ steps.vars.outputs.branch }}.piveau-ln-preview.zazukoians.org
58-
http:
59-
paths:
60-
- path: /
61-
pathType: Prefix
62-
backend:
63-
service:
64-
name: piveau-ui
65-
port:
66-
name: http
67-
EOF
68-
)"
46+
kustomize edit add patch \
47+
--group networking.k8s.io \
48+
--version v1 \
49+
--kind Ingress \
50+
--name piveau-ui \
51+
--patch '[
52+
{"op": "replace", "path": "/spec/tls/0/secretName", "value": "${{ steps.vars.outputs.branch }}-prev-tls"},
53+
{"op": "replace", "path": "/spec/tls/0/hosts/0", "value": "${{ steps.vars.outputs.branch }}.piveau-ln-preview.zazukoians.org"},
54+
{"op": "replace", "path": "/spec/rules/0/host", "value": "${{ steps.vars.outputs.branch }}.piveau-ln-preview.zazukoians.org"}
55+
]'
6956
kustomize edit set image "ghcr.io/opendata-swiss/ods-ui=ghcr.io/opendata-swiss/ods-ui:sha-${{ steps.vars.outputs.short_sha }}"
7057
kustomize edit set label "app.kubernetes.io/instance:${{ steps.vars.outputs.branch }}"
7158
kustomize build | tee manifest.yaml

0 commit comments

Comments
 (0)