forked from BuildOnViction/victionchain
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
100 lines (91 loc) · 3.11 KB
/
.travis.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
sudo: required
language: go
go_import_path: github.com/rupayaproject/rupaya
env:
global:
- GOPROXY=https://proxy.golang.org
- GO111MODULE=on
jobs:
include:
- stage: Lint
sudo: false
go: '1.12.x'
git:
submodules: false
script:
- go run build/ci.go lint
- stage: Build and test
go: '1.12.x'
script:
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
- go run build/ci.go install
- while sleep 540; do echo "[ still running ]"; done &
- go run build/ci.go test -coverage
- kill %1
- go: '1.11.x'
script:
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
- go run build/ci.go install
- while sleep 540; do echo "[ still running ]"; done &
- go run build/ci.go test -coverage
- kill %1
- stage: Github release
go: '1.12.x'
script:
- GOARCH=amd64 GOOS=linux go build -o ./build/bin/rupaya-linux-amd64 -v ./cmd/rupaya
deploy:
provider: releases
api_key: $GITHUB_TOKEN
overwrite: true
file_glob: true
file: build/bin/rupaya-*
skip_cleanup: true
on:
tags: true
- stage: Build and push image
services:
- docker
install: skip
before_script:
- docker build -t rupayaproject/rupaya .
- docker build -t rupaya/node -f Dockerfile.node .
script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker tag rupayaproject/rupaya rupayaproject/rupaya:latest
- docker push rupayaproject/rupaya:latest
- docker tag rupayaproject/rupaya rupayaproject/rupaya:$TRAVIS_BUILD_ID
- docker push rupayaproject/rupaya:$TRAVIS_BUILD_ID
- docker tag rupaya/node rupaya/node:latest
- docker push rupaya/node:latest
- docker tag rupaya/node rupaya/node:$TRAVIS_BUILD_ID
- docker push rupaya/node:$TRAVIS_BUILD_ID
- stage: Build and push image (tagged)
services:
- docker
install: skip
before_script:
- docker build -t rupayaproject/rupaya .
- docker build -t rupayaproject/rupaya -f Dockerfile.node .
script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker tag rupayaproject/rupaya rupayaproject/rupaya:latest
- docker push rupayaproject/rupaya:latest
- docker tag rupayaproject/rupaya rupayaproject/rupaya:$TRAVIS_TAG
- docker push rupayaproject/rupaya:$TRAVIS_TAG
- docker tag rupayaproject/rupaya rupaya/node:latest
- docker push rupaya/node:latest
- docker tag rupaya/node rupaya/node:$TRAVIS_TAG
- docker push rupaya/node:$TRAVIS_TAG
stages:
- name: Lint
- name: Build and test
- name: Github release
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = rupayaproject/rupaya
- name: Build and push image
if: type != pull_request AND branch = master AND tag IS blank AND repo = rupayaproject/rupaya
- name: Build and push image (tagged)
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = rupayaproject/rupaya