diff --git a/.github/workflows/cgw-dev-deployment.yaml b/.github/workflows/cgw-dev-deployment.yaml index 12b4c4c063..becbd3a7f2 100644 --- a/.github/workflows/cgw-dev-deployment.yaml +++ b/.github/workflows/cgw-dev-deployment.yaml @@ -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()