-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
66 lines (58 loc) · 1.35 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
60
61
62
63
64
65
66
image: golang:1.14-alpine
stages:
- build
- release
before_script:
- export DEBIAN_FRONTEND=noninteractive
- export CGO_ENABLED=0
- apk add --upgrade --no-cache ca-certificates
- wget "http://certs.corp.magnax.ca/root.crt" -O /usr/local/share/ca-certificates/magnax-root.crt
- wget "http://certs.corp.magnax.ca/proxy.crt" -O /usr/local/share/ca-certificates/magnax-proxy.crt
- update-ca-certificates
build client:
stage: build
script:
- mkdir build
- go build -o build/gokku ./cmd/gokku
artifacts:
paths:
- build/gokku
expire_in: 7 day
only:
refs:
- branches
.cross_build_client: &cross_build_client
stage: build
script:
- go get github.com/mitchellh/gox
- gox -arch="${BUILD_ARCH}" -output="build/gokku-{{.OS}}-{{.Arch}}" ./cmd/gokku
only:
refs:
- tags
artifacts:
paths:
- build/*
# expire fast given that the release job will cache them
expire_in: 1 day
cross build client amd64:
<<: *cross_build_client
before_script:
- export BUILD_ARCH=amd64
cross build client 386:
<<: *cross_build_client
before_script:
- export BUILD_ARCH=386
cross build client arm:
<<: *cross_build_client
before_script:
- export BUILD_ARCH=arm
release client:
stage: release
script:
- ls build/
artifacts:
paths:
- build/*
only:
refs:
- tags