From 5e182920fe54ec6f1b71f4a50d0f41d3253d865e Mon Sep 17 00:00:00 2001 From: Carsten Schafer Date: Thu, 19 Sep 2024 08:46:28 -0400 Subject: [PATCH] WIFI-13821 rework gh CGW deploy action-4 Signed-off-by: Carsten Schafer --- .github/workflows/cgw-dev-deployment.yaml | 38 ++++++++--------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/.github/workflows/cgw-dev-deployment.yaml b/.github/workflows/cgw-dev-deployment.yaml index ead9ded51..97f618e50 100644 --- a/.github/workflows/cgw-dev-deployment.yaml +++ b/.github/workflows/cgw-dev-deployment.yaml @@ -108,11 +108,9 @@ jobs: ref: ${{ env.VERSION }} - name: Fetch kubeconfig - env: - AWS_EKS_NAME: ${{ github.events.inputs.cluster }} - AWS_DEFAULT_REGION: ${{ github.events.inputs.region }} run: | - aws eks update-kubeconfig --name "$AWS_EKS_NAME" + export AWS_DEFAULT_REGION=${{ github.events.inputs.region }} + aws eks update-kubeconfig --name ${{ github.events.inputs.cluster }} - name: Install kubectl, helmfile and plugins run: | @@ -138,42 +136,32 @@ jobs: - name: Deploy OpenLAN Cloud Gateway and services if: ${{ github.event.inputs.upgrade }} == "false" working-directory: wlan-cloud-ucentral-deploy/cgw - env: - IMG_TAG: ${{ github.events.inputs.cgw_image }} - CONFIG_NAME: ${{ github.events.inputs.config_name }} - NAMESPACE: ${{ github.events.inputs.namespace }} run: | - helm ls -n $NAMESPACE + helm ls -n ${{ github.events.inputs.namespace }} echo "If already installed then it may not be possible to upgrade service components" - helmfile --environment $CONFIG_NAME \ - --state-values-set "cgw.tag=$IMG_TAG" \ + helmfile --environment ${{ github.events.inputs.config_name }} \ + --state-values-set "cgw.tag=${{ github.events.inputs.cgw_image }}" \ apply - name: Deploy OpenLAN Cloud Gateway only if: ${{ github.event.inputs.upgrade }} == "true" working-directory: wlan-cloud-ucentral-deploy/cgw - env: - IMG_TAG: ${{ github.events.inputs.cgw_image }} - CONFIG_NAME: ${{ github.events.inputs.config_name }} - NAMESPACE: ${{ github.events.inputs.namespace }} run: | - helm ls -n $NAMESPACE - helmfile --environment $CONFIG_NAME -l app=cgw \ - --state-values-set "cgw.tag=$IMG_TAG" \ + helm ls -n {{ github.events.inputs.namespace }} + helmfile --environment ${{ github.events.inputs.config_name }} -l app=cgw \ + --state-values-set "cgw.tag=${{ github.events.inputs.cgw_image }}" \ apply - name: Show resource state on deployment failure if: failure() - env: - NAMESPACE: ${{ github.events.inputs.namespace }} run: | echo "Deploy/STS:" - kubectl get deploy,sts --namespace $NAMESPACE -o wide + kubectl get deploy,sts --namespace {{ github.events.inputs.namespace }} -o wide echo "Pods:" - kubectl get pods --namespace $NAMESPACE -o wide + kubectl get pods --namespace {{ github.events.inputs.namespace }} -o wide echo "Pod Descriptions:" - kubectl describe pods --namespace $NAMESPACE + kubectl describe pods --namespace {{ github.events.inputs.namespace }} echo "Services:" - kubectl get services --namespace $NAMESPACE -o wide + kubectl get services --namespace {{ github.events.inputs.namespace }} -o wide echo "Service Descriptions:" - kubectl describe services --namespace $NAMESPACE + kubectl describe services --namespace {{ github.events.inputs.namespace }}