-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
62 lines (57 loc) · 1.27 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
image: golang:1.8
stages:
- test
- build
- push
variables:
VERSION: $CI_BUILD_TAG
before_script:
- echo $PWD
- source script/prepare
- make prepare
- make validate
- make test || true
build:
stage: build
script:
- make binary
- make crossbinary
- cp config.json dist/
- cp schedule.json dist/
- cp README.md dist/
- tar cfz gorcon-arma-${VERSION}.src.tar.gz --exclude-vcs dist
artifacts:
paths:
- dist/
package:
stage: build
script:
- make install
- VERSION=$VERSION make package
- cp /go/gorcon-arma_${VERSION}.deb .
only:
- tags
environment:
name: storage
url: https://storage.play-net.org/minio/gorcon-arma
artifacts:
paths:
- gorcon-arma_${VERSION}.deb
push:
stage: push
image: python:latest
before_script:
- pip install awscli
- cp gorcon-arma_${VERSION}.deb dist/
script:
- aws --endpoint-url https://storage.play-net.org s3 cp ./dist/ s3://gorcon-arma/artifacts/${VERSION} --recursive --include "*"
- curl -T gorcon-arma_${VERSION}.deb -ufinch:$BINTRAY_API https://api.bintray.com/content/playnet/debian/GoRcon-ArmA/$VERSION/gorcon-arma-${VERSION}.deb
only:
- tags
when: on_success
environment:
name: storage
url: https://storage.play-net.org/minio/gorcon-arma
artifacts:
paths:
- dist/