Skip to content

Commit

Permalink
Updated backend deployment script to support deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
cditcher committed Nov 29, 2024
1 parent 84f037f commit 4977049
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-n-deploy-backend-to-ocp-dev-vue3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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/[email protected]
Expand Down

0 comments on commit 4977049

Please sign in to comment.