From 45f5a43ff8c3485ff499d628aff3ea50dd96148c Mon Sep 17 00:00:00 2001 From: Kamal Mohammed Date: Mon, 23 Dec 2024 20:43:19 -0700 Subject: [PATCH] Add New Redis Github Action --- .../workflows/create-redis-standalone-DEV.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/create-redis-standalone-DEV.yml diff --git a/.github/workflows/create-redis-standalone-DEV.yml b/.github/workflows/create-redis-standalone-DEV.yml new file mode 100644 index 0000000..dd73ea8 --- /dev/null +++ b/.github/workflows/create-redis-standalone-DEV.yml @@ -0,0 +1,37 @@ +name: Create Redis Standalone - DEV +env: + OPENSHIFT_SERVER: ${{ vars.OPENSHIFT_SERVER }} + OPENSHIFT_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }} + OPENSHIFT_NAMESPACE: ${{ vars.GRAD_UI_NAMESPACE }}-dev + COMMON_NAMESPACE: ${{ vars.COMMON_NAMESPACE }} + GRAD_NAMESPACE: ${{ vars.GRAD_NAMESPACE }} + BUSINESS_NAMESPACE: ${{ vars.GRAD_BUSINESS_NAMESPACE }} + GRAD_UI_NAMESPACE: ${{ vars.GRAD_UI_NAMESPACE }} + REPLICAS: 9 +on: + workflow_dispatch: +jobs: + create-redis-cluster: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Install oc + uses: redhat-actions/openshift-tools-installer@v1 + with: + oc: 4 + - name: init + run : | + echo "Initializing..." + set -eux + # Login to OpenShift and select project + oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }} + oc project ${{ env.OPENSHIFT_NAMESPACE }} + - name: cleanup + run : | + echo "Cleaning up previous installation (if any)..." + oc delete all,rc,svc,dc,deployment,route,pvc,secret,configmap,sa,RoleBinding -l app=redis + - name: Deploy Redis Server + run: | + oc process -f redis/redis-sa.yaml | oc apply -f - + echo "Done!" \ No newline at end of file