WIFI-13821 rework gh CGW deploy action-6

Signed-off-by: Carsten Schafer <Carsten.Schafer@kinarasystems.com>
This commit is contained in:
Carsten Schafer
2024-09-19 09:42:14 -04:00
parent 427e7a8382
commit 33de5fb74f

View File

@@ -125,31 +125,27 @@ jobs:
- name: Create certificate file
working-directory: wlan-cloud-ucentral-deploy/cgw
run: |
echo "${{ env.DIGICERT_CERT }}" | base64 -d > websocket-cert.pem
echo "${{ env.DIGICERT_KEY }}" | base64 -d > websocket-key.pem
echo "${{ secrets.DIGICERT_CERT }}" | base64 -d > websocket-cert.pem
echo "${{ secrets.DIGICERT_KEY }}" | base64 -d > websocket-key.pem
./mkcertconfig websocket-cert.pem websocket-key.pem > values/certs.device.yaml
kubectl create secret generic certs --dry-run=client -o yaml \
--from-file=websocket-key.pem --from-file=websocket-cert.pem \
| grep websocket- >> values/certs.device.yaml
- name: Deploy OpenLAN Cloud Gateway and services
if: ${{ github.event.inputs.upgrade }} == "false"
- name: Deploy OpenLAN Cloud Gateway
working-directory: wlan-cloud-ucentral-deploy/cgw
run: |
helm ls -n ${{ github.event.inputs.namespace }}
echo "If already installed then it may not be possible to upgrade service components"
helmfile --environment ${{ github.event.inputs.config_name }} \
--state-values-set "cgw.tag=${{ github.event.inputs.cgw_image }}" \
apply
- name: Deploy OpenLAN Cloud Gateway only
if: ${{ github.event.inputs.upgrade }} == "true"
working-directory: wlan-cloud-ucentral-deploy/cgw
run: |
helm ls -n ${{ github.event.inputs.namespace }}
helmfile --environment ${{ github.event.inputs.config_name }} -l app=cgw \
--state-values-set "cgw.tag=${{ github.event.inputs.cgw_image }}" \
apply
if [[ "${{ github.event.inputs.upgrade }}" == "false" ]] ; then
echo "If already installed then it may not be possible to upgrade service components"
helmfile --environment ${{ github.event.inputs.config_name }} \
--state-values-set "cgw.tag=${{ github.event.inputs.cgw_image }}" \
apply
else
helmfile --environment ${{ github.event.inputs.config_name }} -l app=cgw \
--state-values-set "cgw.tag=${{ github.event.inputs.cgw_image }}" \
apply
fi
- name: Show resource state on deployment failure
if: failure()