Skip to content

Commit

Permalink
Grad2-3111 converted grad graduation report api deployment (#306)
Browse files Browse the repository at this point in the history
* Converted deployment config to K8s deployment

* Converted deployment config to K8s deployment

* Converted deployment config to K8s deployment
  • Loading branch information
githubmamatha authored Dec 23, 2024
1 parent c96bad9 commit eee5750
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 84 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/build.from.developer.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ env:
# 🖊️ EDIT your repository secrets to log into your OpenShift cluster and set up the context.
# See https://github.com/redhat-actions/oc-login#readme for how to retrieve these values.
# To get a permanent token, refer to https://github.com/redhat-actions/oc-login/wiki/Using-a-Service-Account-for-GitHub-Actions
OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }}
OPENSHIFT_SERVER: ${{ vars.OPENSHIFT_SERVER }}
OPENSHIFT_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }}
OPENSHIFT_NAMESPACE: ${{ secrets.GRAD_NAMESPACE }}-dev
COMMON_NAMESPACE: ${{ secrets.COMMON_NAMESPACE }}
NAMESPACE: ${{ secrets.GRAD_NAMESPACE }}
BUSINESS_NAMESPACE: ${{ secrets.GRAD_BUSINESS_NAMESPACE }}
OPENSHIFT_NAMESPACE: ${{ vars.GRAD_NAMESPACE }}-dev
COMMON_NAMESPACE: ${{ vars.COMMON_NAMESPACE }}
GRAD_NAMESPACE: ${{ vars.GRAD_NAMESPACE }}
BUSINESS_NAMESPACE: ${{ vars.GRAD_BUSINESS_NAMESPACE }}

# 🖊️ EDIT to change the image registry settings.
# Registries such as GHCR, Quay.io, and Docker Hub are supported.
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
IMAGE_REGISTRY_USER: ${{ github.actor }}
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}

SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api-dc
SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api

REPO_NAME: "educ-grad-graduation-report-api"
APP_DOMAIN: ${{ secrets.APP_DOMAIN }}
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
BRANCH: "main"
TAG: "latest"
MIN_CPU: "20m"
Expand Down Expand Up @@ -113,23 +113,30 @@ 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.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
# tag image stream
oc -n ${{ env.OPENSHIFT_NAMESPACE }} tag ${{ steps.push-image.outputs.registry-path }} ${{ env.REPO_NAME }}:${{ env.TAG }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ github.event.inputs.choice }}/tools/config/update-configmap.sh \
| bash /dev/stdin \
dev \
${{ env.REPO_NAME }} \
${{ env.NAMESPACE }} \
${{ env.GRAD_NAMESPACE }} \
${{ env.COMMON_NAMESPACE }} \
${{ env.BUSINESS_NAMESPACE }} \
${{ secrets.SPLUNK_TOKEN }} \
Expand All @@ -140,18 +147,17 @@ jobs:
| bash /dev/stdin \
dev \
${{ env.REPO_NAME }} \
${{ env.NAMESPACE }} \
${{ env.GRAD_NAMESPACE }} \
${{ env.COMMON_NAMESPACE }} \
${{ env.BUSINESS_NAMESPACE }} \
${{ secrets.SPLUNK_TOKEN }} \
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout restart deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# now hit it with a zap scan
- name: ZAP Scan
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/build.from.main.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
IMAGE_REGISTRY_USER: ${{ github.actor }}
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}

SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api-dc
SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api

REPO_NAME: "educ-grad-graduation-report-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
Expand All @@ -42,7 +42,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Determine image tags
if: env.TAG == ''
Expand Down Expand Up @@ -95,16 +95,23 @@ 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.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
# tag image stream
oc -n ${{ env.OPENSHIFT_NAMESPACE }} tag ${{ steps.push-image.outputs.registry-path }} ${{ env.REPO_NAME }}:${{ env.TAG }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ env.BRANCH }}/tools/config/update-configmap.sh \
Expand All @@ -129,11 +136,10 @@ jobs:
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout restart deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# now hit it with a zap scan
- name: ZAP Scan
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/build.from.release.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ env:
IMAGE_REGISTRY_USER: ${{ github.actor }}
IMAGE_REGISTRY_PASSWORD: ${{ github.token }}

SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api-dc

SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api
REPO_NAME: "educ-grad-graduation-report-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
BRANCH: "grad-release"
Expand Down Expand Up @@ -102,16 +103,23 @@ 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.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
# tag image stream
oc -n ${{ env.OPENSHIFT_NAMESPACE }} tag ${{ steps.push-image.outputs.registry-path }} ${{ env.REPO_NAME }}:${{ env.TAG }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ env.TAG }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ env.BRANCH }}/tools/config/update-configmap.sh \
Expand All @@ -136,12 +144,11 @@ jobs:
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout restart deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# now hit it with a zap scan
- name: ZAP Scan
uses: zaproxy/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create tag
uses: actions/github-script@v5
Expand All @@ -54,7 +54,7 @@ jobs:
oc: 4

# https://github.com/redhat-actions/oc-login#readme
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Tag in OpenShift
run: |
set -eux
Expand Down
31 changes: 19 additions & 12 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
COMMON_NAMESPACE: ${{ vars.COMMON_NAMESPACE }}
BUSINESS_NAMESPACE: ${{ vars.GRAD_BUSINESS_NAMESPACE }}

SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api-dc
SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api

REPO_NAME: "educ-grad-graduation-report-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get latest tag
uses: actions-ecosystem/action-get-latest-tag@v1
Expand All @@ -52,25 +52,33 @@ jobs:
oc: 4

# https://github.com/redhat-actions/oc-login#readme
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Deploy
run: |
set -eux
# Login to OpenShift and select project
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.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
oc tag ${{ env.GRAD_NAMESPACE }}-test/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }} \
${{ env.GRAD_NAMESPACE }}-prod/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ steps.get-latest-tag.outputs.tag }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ steps.get-latest-tag.outputs.tag }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 }} \
-p STORAGE_LIMIT=${{ env.STORAGE_LIMIT }} | oc apply -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ env.BRANCH }}/tools/config/update-configmap.sh \
Expand All @@ -84,8 +92,7 @@ jobs:
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout restart deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
31 changes: 19 additions & 12 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
COMMON_NAMESPACE: ${{ vars.COMMON_NAMESPACE }}
BUSINESS_NAMESPACE: ${{ vars.GRAD_BUSINESS_NAMESPACE }}

SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api-dc
SPRING_BOOT_IMAGE_NAME: educ-grad-graduation-report-api

REPO_NAME: "educ-grad-graduation-report-api"
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get latest tag
uses: actions-ecosystem/action-get-latest-tag@v1
Expand All @@ -52,25 +52,33 @@ jobs:
oc: 4

# https://github.com/redhat-actions/oc-login#readme
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Deploy
run: |
set -eux
# Login to OpenShift and select project
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.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
oc rollout cancel deployment/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
oc tag ${{ env.GRAD_NAMESPACE }}-dev/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }} \
${{ env.GRAD_NAMESPACE }}-test/${{ env.REPO_NAME }}:${{ steps.get-latest-tag.outputs.tag }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ steps.get-latest-tag.outputs.tag }} -p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 -f -
oc process -f tools/openshift/api.dc.yaml \
-p IS_NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \
-p REPO_NAME=${{ env.REPO_NAME }} \
-p TAG_NAME=${{ steps.get-latest-tag.outputs.tag }} \
-p HOST_ROUTE=${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}.${{ env.APP_DOMAIN }} \
-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 }} \
-p STORAGE_LIMIT=${{ env.STORAGE_LIMIT }} | oc apply -f -
# UPDATE Configmaps
curl -s https://raw.githubusercontent.com/bcgov/${{ env.REPO_NAME }}/${{ env.BRANCH }}/tools/config/update-configmap.sh \
Expand All @@ -84,8 +92,7 @@ jobs:
${{ vars.APP_LOG_LEVEL }}
# Start rollout (if necessary) and follow it
oc rollout latest dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \
|| true && echo "Rollout in progress"
oc logs -f dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout latest deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
# Get status, returns 0 if rollout is successful
oc rollout status dc/${{ env.SPRING_BOOT_IMAGE_NAME }}
oc rollout status deployment/${{ env.SPRING_BOOT_IMAGE_NAME }}
6 changes: 3 additions & 3 deletions .github/workflows/on.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
working-directory: api

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 18
uses: actions/setup-java@v1
with:
java-version: 18
- uses: actions/cache@v1
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-5Jun-${{ hashFiles('**/pom.xml') }}
Expand All @@ -46,7 +46,7 @@ jobs:
with:
sarif_file: 'trivy-results.sarif'
- name: Cache SonarCloud packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
Expand Down
Loading

0 comments on commit eee5750

Please sign in to comment.