Skip to content

Create Redis Standalone - DEV #3

Create Redis Standalone - DEV

Create Redis Standalone - DEV #3

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-standalone:
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!"