diff --git a/.github/workflows/create-redis-cluster-DEV.yml b/.github/workflows/create-redis-cluster-DEV.yml index 85841a2..764d15d 100644 --- a/.github/workflows/create-redis-cluster-DEV.yml +++ b/.github/workflows/create-redis-cluster-DEV.yml @@ -40,7 +40,7 @@ jobs: - name: Create Cluster run: | echo "Retrieve redis password..." - REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's/.*"REDIS_PASSWORD": "\(.*\)",/\1/p' | base64 --decode) + REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's|.*"REDIS_PASSWORD": "\([^"]*\)".*|\1|p' | base64 --decode) echo "Creating Cluster..." oc exec -i redis-ha-0 -- redis-cli --cluster create --cluster-replicas 1 $(oc get pods -l app=redis-ha -o jsonpath='{range.items[*]}{.status.podIP}:6379 {end}') --cluster-yes -a $REDIS_PASSWORD echo "Success!" \ No newline at end of file diff --git a/.github/workflows/create-redis-cluster-PROD.yml b/.github/workflows/create-redis-cluster-PROD.yml index d644131..510a7e5 100644 --- a/.github/workflows/create-redis-cluster-PROD.yml +++ b/.github/workflows/create-redis-cluster-PROD.yml @@ -40,7 +40,7 @@ jobs: - name: Create Cluster run: | echo "Retrieve redis password..." - REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's/.*"REDIS_PASSWORD": "\(.*\)",/\1/p' | base64 --decode) + REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's|.*"REDIS_PASSWORD": "\([^"]*\)".*|\1|p' | base64 --decode) echo "Creating Cluster..." oc exec -i redis-ha-0 -- redis-cli --cluster create --cluster-replicas 1 $(oc get pods -l app=redis-ha -o jsonpath='{range.items[*]}{.status.podIP}:6379 {end}') --cluster-yes -a $REDIS_PASSWORD echo "Success!" diff --git a/.github/workflows/create-redis-cluster-TEST.yml b/.github/workflows/create-redis-cluster-TEST.yml index 02c08de..454a09e 100644 --- a/.github/workflows/create-redis-cluster-TEST.yml +++ b/.github/workflows/create-redis-cluster-TEST.yml @@ -40,7 +40,7 @@ jobs: - name: Create Cluster run: | echo "Retrieve redis password..." - REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's/.*"REDIS_PASSWORD": "\(.*\)",/\1/p' | base64 --decode) + REDIS_PASSWORD=$(oc -o json get secret redis-ha | sed -n 's|.*"REDIS_PASSWORD": "\([^"]*\)".*|\1|p' | base64 --decode) echo "Creating Cluster..." oc exec -i redis-ha-0 -- redis-cli --cluster create --cluster-replicas 1 $(oc get pods -l app=redis-ha -o jsonpath='{range.items[*]}{.status.podIP}:6379 {end}') --cluster-yes -a $REDIS_PASSWORD echo "Success!"