Skip to content

Commit

Permalink
fix not executing replace script for rubicon
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasForst authored Apr 29, 2020
1 parent 4b24d94 commit 7b8a94d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,10 @@ jobs:
IMAGE: ${{ env.DOCKER_IMAGE }}
SERVICE: ${{ env.SERVICE_NAME }}
VERSION: ${{ env.RELEASE_VERSION }}
run: |-
# go to directory with configuration
run: |
cd "rubicon/prod/services/$SERVICE"
# escape literals for the sed
export SED_PREPARED=$(echo $IMAGE | awk '{ gsub("/", "\\/", $1); print $1 }')
# update final yaml
sed -i".bak" "s/image: $SED_PREPARED.*/image: $SED_PREPARED:$VERSION/g" "$SERVICE.yaml"
# delete bakup file
rm "$SERVICE.yaml.bak"
# Setup gcloud CLI
Expand All @@ -78,22 +74,22 @@ jobs:

# Configure Docker to use the gcloud command-line tool
- name: Configure Docker Google cloud
run: |-
run: |
gcloud --quiet auth configure-docker
# Get the GKE credentials so we can deploy to the cluster
- name: Obtain k8s credentials
env:
GKE_CLUSTER: anayotto
GKE_ZONE: europe-west1-c
run: |-
run: |
gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE"
# K8s is set up, deploy the app
- name: Deploy the Service
env:
SERVICE: ${{ env.SERVICE_NAME }}
run: |-
run: |
kubectl apply -f "rubicon/prod/services/$SERVICE/$SERVICE.yaml"
# Commit all data to Rubicon and open PR
Expand Down

0 comments on commit 7b8a94d

Please sign in to comment.