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