From 497704959c0aad0cccbc8bdd0b86ec6cd71a66d1 Mon Sep 17 00:00:00 2001 From: cditcher Date: Fri, 29 Nov 2024 09:45:37 -0800 Subject: [PATCH] Updated backend deployment script to support deployment --- .../workflows/build-n-deploy-backend-to-ocp-dev-vue3.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-n-deploy-backend-to-ocp-dev-vue3.yml b/.github/workflows/build-n-deploy-backend-to-ocp-dev-vue3.yml index b2f61e1c..265bdfec 100644 --- a/.github/workflows/build-n-deploy-backend-to-ocp-dev-vue3.yml +++ b/.github/workflows/build-n-deploy-backend-to-ocp-dev-vue3.yml @@ -147,7 +147,7 @@ jobs: oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }} oc project ${{ env.OPENSHIFT_NAMESPACE }} # Cancel any rollouts in progress - oc rollout cancel dc/${{ env.IMAGE_NAME }}-dc 2> /dev/null \ + oc rollout cancel deployment/${{ env.IMAGE_NAME }} 2> /dev/null \ || true && echo "No rollout in progress" oc project ${{ env.OPENSHIFT_NAMESPACE }} @@ -161,12 +161,12 @@ jobs: oc process -f tools/openshift/backend-dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=educ-grad-admin -p HOST_ROUTE=educ-grad-admin-${{secrets.GRAD_NAMESPACE_NO_ENV}}-dev.apps.silver.devops.gov.bc.ca -p MIN_REPLICAS=${{ env.MIN_REPLICAS }} -p MAX_REPLICAS=${{ env.MAX_REPLICAS }} -p MIN_CPU=${{ env.MIN_CPU }} -p MAX_CPU=${{ env.MAX_CPU }} -p MIN_MEM=${{ env.MIN_MEM }} -p MAX_MEM=${{ env.MAX_MEM }} | oc apply -n ${{secrets.GRAD_NAMESPACE_NO_ENV}}-dev -f - # Start rollout (if necessary) and follow it - oc rollout latest dc/${{ env.IMAGE_NAME }}-dc 2> /dev/null \ + oc rollout restart deployment/${{ env.IMAGE_NAME }} 2> /dev/null \ || true && echo "Rollout in progress" - oc logs -f dc/${{ env.IMAGE_NAME }}-dc + oc logs -f deployment/${{ env.IMAGE_NAME }} # Get status, returns 0 if rollout is successful - oc rollout status dc/${{ env.IMAGE_NAME }}-dc + oc rollout status deployment/${{ env.IMAGE_NAME }} - name: ZAP Scan uses: zaproxy/action-full-scan@v0.10.0