Skip to content

Commit

Permalink
updating action scripts, changing deploy to send image tags to TEST a…
Browse files Browse the repository at this point in the history
…nd then PROD
  • Loading branch information
SoLetsDev committed Oct 11, 2023
1 parent f51286d commit 5ff26ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to.openshift-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
oc rollout cancel dc/${{ env.IMAGE_NAME }} 2> /dev/null \
|| true && echo "No rollout in progress"
oc tag ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-${{ env.BRANCH }}:${{ steps.get-latest-tag.outputs.tag }} ${{ env.NAMESPACE }}-prod/${{ env.REPO_NAME }}-${{ env.BRANCH }}:${{ steps.get-latest-tag.outputs.tag }}
oc tag ${{ env.NAMESPACE }}-test/${{ env.REPO_NAME }}-${{ env.BRANCH }}:${{ steps.get-latest-tag.outputs.tag }} ${{ env.NAMESPACE }}-prod/${{ env.REPO_NAME }}-${{ env.BRANCH }}:${{ steps.get-latest-tag.outputs.tag }}
# Process and apply deployment template
oc process -f tools/openshift/api.dc.yaml -p APP_NAME=${{ env.APP_NAME }} -p REPO_NAME=${{ env.REPO_NAME }} -p BRANCH=${{ env.BRANCH }} -p NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p TAG=${{ steps.get-latest-tag.outputs.tag }} -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 }} \
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/deploy-to.openshift-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ env:
BRANCH: "main"
NAMESPACE: ${{ secrets.PEN_NAMESPACE_NO_ENV }}
COMMON_NAMESPACE: ${{ secrets.COMMON_NAMESPACE_NO_ENV }}
TAG: "latest"
TAG: ${{ github.event.inputs.tag }}
MIN_REPLICAS_TEST: "2"
MAX_REPLICAS_TEST: "2"
MIN_CPU: "5m"
Expand All @@ -40,6 +40,12 @@ env:

on:
workflow_dispatch:
inputs:
tag:
description: 'Please input the tag, latest or release ex. 1.2.3'
type: string
required: true
default: "latest"

jobs:
deploy-test:
Expand Down

0 comments on commit 5ff26ce

Please sign in to comment.