-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
28 lines (26 loc) · 823 Bytes
/
.gitlab-ci.yml
File metadata and controls
28 lines (26 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay
GROUP: midnight-lizard
PROJ: schemes-commander
docker-build:
stage: build
only:
- master
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY;
- docker build -t $CI_REGISTRY/$GROUP/$PROJ:$CI_PIPELINE_ID ./;
- docker push $CI_REGISTRY/$GROUP/$PROJ:$CI_PIPELINE_ID;
gce-deploy:
image: google/cloud-sdk
stage: deploy
only:
- master
script:
- chmod +x ./shell/gcloud-config.sh
- ./shell/gcloud-config.sh -k "$GCE_KEY" -z "$GCE_CLUSTER_ZONE" -p "$GCE_PROJECT" -c "$GCE_CLUSTER_NAME"
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
- helm init --upgrade
- helm upgrade --install --set image="$CI_REGISTRY/$GROUP/$PROJ:$CI_PIPELINE_ID" $PROJ ./kube/$PROJ