forked from travis-ci/worker
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
91 lines (83 loc) · 2.01 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
language: go
go: 1.14.x
dist: xenial
cache:
directories:
- vendor
- $HOME/.cache/go-build
- $HOME/gopath/bin
- $HOME/gopath/pkg/mod
services:
- rabbitmq
- docker
- redis
env:
global:
- AMQP_URI="amqp://"
- GOPATH="$HOME/gopath"
- PATH="bin:$HOME/gopath/bin:$HOME/bin:$PATH"
- CHECKOUT_ROOT="$HOME/gopath/src/github.com/travis-ci/worker"
- GO15VENDOREXPERIMENT='1'
- REDIS_URL="redis://"
stages:
- test
before_cache:
- make clean
jobs:
include:
- stage: test
name: linux
go: 1.14.x
script:
- make deps
- make lintall
- GO111MODULE=on make build
- mkdir -p build/linux/amd64
- cp ${GOPATH%%:*}/bin/travis-worker build/linux/amd64
- make test-no-cover
- make test-cover
- make smoke
addons:
apt:
packages:
- rabbitmq-server
artifacts:
paths:
- ./build/linux/amd64/travis-worker
target_paths:
- travis-ci/worker/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
- travis-ci/worker/$(git describe --always --dirty --tags)
- travis-ci/worker/$TRAVIS_BRANCH
- stage: test
name: crossbuild
go: 1.14.x
script:
- GO111MODULE=on make build/darwin/amd64/travis-worker
addons:
artifacts:
paths:
- ./build/darwin/amd64/travis-worker
target_paths:
- travis-ci/worker/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
- travis-ci/worker/$(git describe --always --dirty --tags)
- travis-ci/worker/$TRAVIS_BRANCH
- stage: test
name: docker
if: type != 'pull_request' && env(DOCKER_LOGIN_PASSWORD) is present && env(DOCKER_LOGIN_USERNAME) is present
script:
- make docker-build
- make smoke-docker
- make docker-push
- make send-docker-hub-trigger
addons:
apt:
update: true
packages:
- docker-ce
- stage: test
name: http-job-test
script:
- GO111MODULE=on make build
- mkdir -p build/linux/amd64
- cp ${GOPATH%%:*}/bin/travis-worker build/linux/amd64
- make http-job-test