Skip to content

medis-etl-app promote to test #9

medis-etl-app promote to test

medis-etl-app promote to test #9

name: medis-etl-app promote to test
on:
workflow_dispatch:
defaults:
run:
working-directory: ./
env:
NAMESPACE_SRC: c2da03-tools
NAMESPACE_TRG: c2da03-test
IMAGE_NAME: medis-etl-image
DEPLOYMENT_NAME: medis-etl-app
SOURCE_IMAGE_TAG: dev
TARGET_IMAGE_TAG: test
jobs:
ocp-integration:
runs-on: ubuntu-latest
steps:
- uses: redhat-actions/openshift-tools-installer@v1
with:
source: "mirror"
oc: "latest"
- name: Log in to Openshift
run: oc login --token=${{ secrets.OPENSHIFT_TOKEN }} --server=${{ secrets.OPENSHIFT_SERVER}}
- name: Tag for Test
run: oc tag -n ${NAMESPACE_SRC} ${NAMESPACE_SRC}/${IMAGE_NAME}:${SOURCE_IMAGE_TAG} ${NAMESPACE_SRC}/${IMAGE_NAME}:${TARGET_IMAGE_TAG}
- name: Rollout to Test
run: oc patch -n ${NAMESPACE_TRG} deployment/${DEPLOYMENT_NAME} --patch "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"last-restart\":\"`date +'%s'`\"}}}}}"