forked from lingrino/vaku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
39 lines (35 loc) · 918 Bytes
/
.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
image: registry.gitlab.com/lingrino/docker/ci:latest
stages:
- validate
- release
- www
validate:
stage: validate
services:
- vault:1.2.0
variables:
SKIP_SETCAP: "true" # Used in `vault` service
VAULT_DEV_ROOT_TOKEN_ID: hunter2 # Used in `vault` service
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8300 # Used in `vault` service
VAKU_VAULT_ADDR: http://vault:8300
script:
- test -z $(gofmt -l -w -s vaku/) # Make sure no formatting is needed
- go test -cover -race -v ./... # Run tests
release:
stage: release
only:
- tags
except:
- branches
script:
- goreleaser
www:
stage: www
only:
refs:
- master
changes:
- www/*
script:
- aws --region "${S3_REGION}" s3 sync www/ "s3://${S3_BUCKET_NAME}" --sse AES256
- aws cloudfront create-invalidation --distribution-id "${CF_DISTRIBUTION_ID}" --paths "/*"