-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
95 lines (95 loc) · 4.91 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
language: go
go:
- '1.10'
sudo: required
addons:
apt:
packages:
- upx-ucl
- musl
- musl-tools
env:
global:
- MAKEFLAGS="-j 4"
- COMMIT=${TRAVIS_COMMIT::7}
- TRAVIS_TAG=${TRAVIS_TAG}
- DOCKER_USERNAME=cblomart
- AWS_ACCESS_KEY_ID=AKIAJI7KTLOL2U7WQAQA
- secure: HdeMVcGgMn5eqQmlKfKY/BVKzsbn/vwAN/KozEG1zW4yI4TKR9slksPZf7Vc+zZllQbTkbc6LlV1OUFOPTxElOOLOAzpqvJ8wNhpMixrSfPEko+aDZEUArKgRDoJwpUgGvT4H5xcWEA530ugu15cpuu3OMoGX5BubZKzgQedS3I7XcxpmfpNMgfbYWhIzXCmETbdQ9rnihZc95rjiVx1CEen2T9JG8DeLJe1ek9cS5gBo5c4+vM6K0x6NNNpEgI3ux/zR1Akg35seoHIvRB51SkpwJgF9fwvAmVE0UbqN/HGSLjKGO/wA81QCzdSzKc+mdcmFnqoPzuPZT5iiOGvQCIrM1ORqjE5Wj6wZHeJC1dudjPoC8Xel2AVuhrlp4GwRsl7j6q+G2NPN6V2Rjqq3ts1gXNrDxRZcEoZvR72e8xkKHkNKsQDsD4DORYFV4y6fwXYyXkdPZIN5iYZnDIfBce4rguNWveAEprhdF25MUAr1m3u9O8U0mAuiBNIBH0cVsA0e0qMwvThBPdpA3xepkbD78v41Uoz7KT4hgeZPGxLN98N/8F+ilpcr2VLe0HMATaI0hX1LrlPITK5h5Gnz3sva931WbTQPfEhAiGcZKlrg6mVi9b6vjf8Rku5Z+PSmbKZo8B9SKMJduUwmH9N+0Q4+Cgiv0MQFfZh3z3Xq2Q=
- secure: Au0hrq98mPB4fwhDT+WodQmY+MUMt5fMQjB5Lf1h3p1mUDwvmhjZaJzlBqa2MaQr93clxzShjNobbtsDJVOEW9KpLUUCLyBRdKj8r8wj5tU8ckvUVGqazeYpKoqKSOiKT4uyBYaIRfpFPV+FmLLuZBvUBta+IcKOaME5ra6QnXQONZVdzta5mAKLCe0/8LYoF4VYj1SwqXYdb9p1F6v7HzMKUA77zFiYrGAMSOjWaD5zEyYzRze15QGcHU1fkcmZzWn23k9iPRUf8tl+SNldlioXcyirOY2ud0nIOJlOVdxZ9+hfPJvb0cuHYgRux7KfAKSEtxRcCp5h6vPM/jOBSdrygzC0v/HYrMi00Lqszgq+NejCO6VKddm4IgbwI4t45JuMC+9AfCt0VD/43wY7GtZxpANcMoFEecSYPLZddCU6j8x+HIb/A6jt8a/TALnG6FlKpO7X7j1cctebxX+uD4HAA9l+6/GKVqHg+cQwQD9coNTW3HFYaKzgt2t/VRGzjMPWsZUIB4apUTKlgXwoxBTR6bwirMrkt6XfLSg26zqL7zr9D3NFSMMLmmaqoHk90ggAuVDZdyZTyAIE3zvXs4Ydsd7RwYosx5/j/uyIi247xRT9UuRfBLrM4aerYKMjDcWK37QMXgFkjMfEFjBQIo4pPBH76eNm2JSLpB8JQ1M=
before_install:
- pip install --user awscli
services:
- docker
before_cache:
- rm -rf $GOPATH/src/github.com/cblomart/vsphere-graphite/*
- rm -rf $GOPATH/pkg/**/github.com/cblomart/vsphere-graphite
cache:
directories:
- "$GOPATH/src"
- "$GOPATH/pkg"
jobs:
include:
- stage: Checks
script:
- make deps
- make checks
- stage: Build
name: Linux amd64
script:
- make deps
- make dist-linux-amd64
- aws s3 cp releases/ s3://vsphere-graphite/$COMMIT/bin/ --recursive --exclude "*.json"
- aws s3 cp /tmp/ s3://vsphere-graphite/$COMMIT/ --recursive --exclude "*" --include "*.tgz"
- script:
- make deps
- make dist-darwin-amd64
- aws s3 cp releases/ s3://vsphere-graphite/$COMMIT/bin/ --recursive --exclude "*.json"
- aws s3 cp /tmp/ s3://vsphere-graphite/$COMMIT/ --recursive --exclude "*" --include "*.tgz"
name: OSX amd64
if: tag IS present
- script:
- make deps
- make dist-windows-amd64
- aws s3 cp releases/ s3://vsphere-graphite/$COMMIT/bin/ --recursive --exclude "*.json"
- aws s3 cp /tmp/ s3://vsphere-graphite/$COMMIT/ --recursive --exclude "*" --include "*.tgz"
name: Windows amd64
if: tag IS present
- script:
- make deps
- make dist-linux-arm
- aws s3 cp releases/ s3://vsphere-graphite/$COMMIT/bin/ --recursive --exclude "*.json"
- aws s3 cp /tmp/ s3://vsphere-graphite/$COMMIT/ --recursive --exclude "*" --include "*.tgz"
name: Linux arm
if: tag IS present
# - stage: Deploy
# script:
# - aws s3 cp s3://vsphere-graphite/$COMMIT/ /tmp/ --recursive --exclude "*" --include "*.tgz"
# if: tag IS present
# deploy:
# skip_cleanup: true
# provider: releases
# api_key:
# secure: gQrD7qd+CrPyBrpOG8mVNLZtcjMAavW3y+vcavNdlb16Mf9aoEIHdiMhv4Peq5hzfkkS8DgtCY7WwFI2KFtCyQNIVM/G6qlaql2OndYRKwGbD+d3sMniPAOulLM1QJ8Kkm4vvTbxK7kqwyL2CmNFEGPk8tQifhmVRNwSCIo5T1BlBVqD9tmYQ5uOq1trXbyY+GyCQ2a4Ff6zZFja4gb8iMNf4Op33pRFnFJrV7di4+ylJpXKjicQ0H0xM74BASD7aT9jA6+Uk8fsr8h7QKeMdovKp491nhKlVvivKNtB8roB52yQFNgjHJM8TJu4/psx11YOYUZMWiBjCdbzb4/gQt153dduAfJXPP/sQWjsxLLlonHtxS/xKjAvEw2Ei+9gMvvzwlhibYna+PYWfvMXGSwyojfNoGiJiBX8bm30ARSfhLIZepDU9AVRE62CR2ZESSegWeOJoCxTClYcGjDeXoxECpEtqOwbrQRVROHlkH2pLg3eJAzb2rQRT0nnoGydg2LecUMDdxyqSvVct/7kZzWBhTEpHh2ZemPoTbe9YytPlCAKORdUe/u8p+gN92KHPx9TXSHY+k3iNvy+8n0Ot8gio7NTpwTOszVC/r3AtFoBlDEy5KpEbdtqv495F0n+ICZzEYnWVz1VgUhnViO0sExoTaWMB8Y7LmH/k+Ufp0Y=
# file_glob: true
# file: /tmp/vsphere-graphite_*.tgz
# on:
# tags: true
- stage: Docker
name: Docker linux amd64
script:
- mkdir -p releases/linux/amd64
- aws s3 cp s3://vsphere-graphite/$COMMIT/vsphere-graphite_linux_amd64.tgz /tmp/vsphere-graphite_linux_amd64.tgz
- tar -zxf /tmp/vsphere-graphite_linux_amd64.tgz -C ./releases/linux/amd64/
- touch releases/linux/amd64/vsphere-graphite
- make docker-linux-amd64
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
#- make push-linux-amd64
- name: Docker linux arm
if: tag IS present
script:
- mkdir -p releases/linux/arm
- aws s3 cp s3://vsphere-graphite/$COMMIT/bin/linux/arm/vsphere-graphite releases/linux/arm/vsphere-graphite
- make docker-linux-arm
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- make push-linux-arm