-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
59 lines (53 loc) · 1.17 KB
/
.gitlab-ci.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
default:
image: gcr.io/google.com/cloudsdktool/cloud-sdk:latest
services:
- docker:20.10.17-dind
before_script:
- until docker info; do sleep 1; done
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"
stages:
- test
- push
- deploy
build:
stage: test
image: gcr.io/pluralsh/circleci/elixir:1.9.4
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- _build
- deps
script:
- make testup
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix test
.push_globals: &push-globs
before_script:
- until docker info; do sleep 1; done
- gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS
- gcloud auth configure-docker -q
- docker login -u [email protected] -p $PLURAL_ACCESS_TOKEN dkr.plural.sh
build-console:
stage: push
<<: *push-globs
only:
- master
script:
- make build GIT_COMMIT=$CI_COMMIT_SHORT_SHA
- make push
deploy:
stage: deploy
only:
- master
image: gcr.io/pluralsh/plrl-base:0.1.9
before_script:
- cat /root/configure.sh
- source /root/configure.sh
script:
- make deploy