-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
50 lines (44 loc) · 1.13 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
---
stages:
- test
- release
.base:
image: registry.gitlab.com/lumoslabs/docker-library/golang:1.13-stretch-ci
variables:
GIT_DEPTH: "3"
GOFLAGS: -mod=vendor
test:
extends: .base
stage: test
script: make test
test:race:
extends: .base
stage: test
script: make test-race
test:memory:
extends: .base
stage: test
script: make test-memory
release:test:
extends: .base
stage: release
services: ["docker:18.09-dind"]
variables:
DOCKER_HOST: tcp://127.0.0.1:2375/
DOCKER_DRIVER: overlay2
script:
- echo "$QUAY_PASSWORD" | docker login --username="$QUAY_USERNAME" --password-stdin quay.io
- echo "$CI_JOB_TOKEN" | docker login --username=gitlab-ci-token --password-stdin $CI_REGISTRY
- make snapshot
release:
extends: .base
stage: release
only: [tags]
services: ["docker:18.09-dind"]
variables:
DOCKER_HOST: tcp://127.0.0.1:2375/
DOCKER_DRIVER: overlay2
script:
- echo "$QUAY_PASSWORD" | docker login --username="$QUAY_USERNAME" --password-stdin quay.io
- echo "$CI_JOB_TOKEN" | docker login --username=gitlab-ci-token --password-stdin $CI_REGISTRY
- make release