From c07dc66b3dbf9c04b5a4cb439daed81de4a20266 Mon Sep 17 00:00:00 2001 From: Sachi King Date: Sat, 26 May 2018 14:47:19 +1000 Subject: [PATCH] Attempt updated CI deployment --- .gitlab-ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2681752..c0ef5202 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,13 +52,11 @@ k8s-2019_dev-deploy: image: google/cloud-sdk stage: deploy script: - - echo "$GOOGLE_KEY" > key.json - - gcloud auth activate-service-account --key-file key.json - - gcloud config set compute/zone australia-southeast1-b - - gcloud config set project linuxconfsydney - - gcloud config set container/use_client_certificate True - - gcloud container clusters get-credentials lca02 - - kubectl --namespace=rego-dev set image deployment/symposion-app symposion-app=asia.gcr.io/linuxconfsydney/symposion_app_2019_dev:$CI_COMMIT_SHA + - echo "${CA_CERT}" > cert.crt + - kubectl config set-cluster cluster --server="${KUBE_SERVER}" --embed-certs=true --certificate-authority=cert.crt + - kubectl config set-context cluster --cluster=cluster --namespace=rego-dev --user=gitlab-sa + - kubectl config use-context cluster + - kubectl --token "${GL_KUBE_TOKEN}" set image deployment/symposion-app symposion-app=asia.gcr.io/linuxconfsydney/symposion_app_2019_dev:$CI_COMMIT_SHA when: manual only: - dev/2019