-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
43 lines (39 loc) · 962 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
40
41
42
variables:
GO_PACKAGE: github.com/wikiwi/kube-volume-freezer
REPOSITORY: registry.intra.wikiwi.io/vinh/kube-volume-freezer
DOCKER_HOST: tcp://wikiwi__dind:2375
MASTER_BRANCH: origin/master
stages:
- test-and-build
- registry
test-and-build:
stage: test-and-build
image: golang:1.6
artifacts:
paths:
- bin/
expire_in: 1 week
cache:
paths:
- vendor
before_script:
- make info
- mkdir -p /go/src/$(dirname ${GO_PACKAGE})
- ln -s $(pwd) /go/src/${GO_PACKAGE}
- cd /go/src/${GO_PACKAGE} && make bootstrap
script:
- cd /go/src/${GO_PACKAGE} && make test build-for-docker
push-image-to-registry:
stage: registry
image: wikiwi/docker-build:canary
services:
- wikiwi/dind
only:
- master
tags:
- sequential
before_script:
- make info
- docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} registry.intra.wikiwi.io
script:
- make docker-build docker-push