forked from charshy/registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (51 loc) · 2.24 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
language: go
# Require Travis to use a docker-enabled virtualization environment for the build
sudo: required
services:
- docker
# Go versions to build with
go:
- 1.6
env:
# Platforms to build for
- PLATFORM=linux/amd64
script:
# Need to set explicitly, as these are unset by 'gimme'
- export GOOS=${PLATFORM%/*}
- export GOARCH=${PLATFORM#*/}
# Analyze, test and build the code, and then package the binary
- make verify release APP_VER=$TRAVIS_TAG
deploy:
# Upload files to GitHub as release attachments
- provider: releases
api_key: $GITHUB_TOKEN
# Keep artifacts produced during the build
skip_cleanup: true
# Upload anything under the release directory
file_glob: true
file: release/*
# Trigger only when building a tagged commit, on the origin repo
on:
tags: true
repo: amalgam8/registry
# Push images to Docker Hub
- provider: script
script: ./scripts/push_dockerhub.sh
# Keep artifacts produced during the build
skip_cleanup: true
# Trigger only when building a version-tagged commit, on the origin repo
on:
tags: true
repo: amalgam8/registry
condition: $TRAVIS_TAG =~ v[0-9]+\.[0-9]+\.[0-9]+
# Configure notifications
notifications:
email:
on_success: never
on_failure: always
slack:
rooms:
- secure: "hwJrBzRlHbS0VAyQTzuu14ibVrzxBUuuKunuVXu9uMYlFac42ZvhGes7exsohE57Q5xlVmkOVLxrRG0EazC4PmLRL34tNJOwADCa3YiO0LoErJO0sHXSHpJ0o1RTBh5TnXL84h9LmjbMM5bIPPbWUEg2MjPSIS26+Dc/DjAHdhP9dg5alfz7xvffiwIdPLL0gZZl9sZ1qA2zlZVaugrCIYGqSXdXiEbVGg+WgDFUM3rAe+r5tlaRM9UHXjySRCtxIf/aQK497FEhAtLNNG/Uf4zn18E4dOkcaQtLKmexi35cS42wgIkcPlqrgE10uRhsrw+32zltPVudj9s9oZJ8bNpLAczUZ2r+2Pxzur8DOZK0+R4SBq9SAfmQqXqWm21x2QuifR/74AO1k1xisG8Y5Y5Vzx4vfetcUko0IeadWMEMI2HCHcH+Q/XKLq+BDHHpjH01RKV6tlr/XQp/zU08XpZ8wDnjDSuWObmpRcfckiCRlXhG1v0XNdwMUkuZI0KgW7aQBTL5GgDhFjOvMfbXvP+tz5VhDrV85zCU13zL0+yqalHNEpjtExFS7yR8OgjqmDmTxwoQRputcW1V741tREGJ2FrVlrFLufiig2+qC1D4NA9npnUE3cLlMT6fMNFqxxDxV2u56EPxEMRdQBlRxtXJvRCV69dEjFHiusDn868="
on_success: always
on_failure: always
on_pull_requests: true