-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
33 lines (27 loc) · 968 Bytes
/
.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
# the following values must be set in https://travis-ci.com/<github-repo>/settings
# - DOCKER_REPO (eg. myrepo/myapp)
# - DOCKER_USERNAME
# - DOCKER_PASSWORD
services: docker
language: go
branches:
only:
- master
- /^v\d+\.\d+\.\d+.*$/
env:
- ARCH=amd64
- ARCH=arm32v6
- ARCH=arm64v8
before_script:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
script:
- make build ARCH=${ARCH} DOCKER_REPO=${DOCKER_REPO}
- make test ARCH=${ARCH} DOCKER_REPO=${DOCKER_REPO}
after_success:
# the following test will make sure we deploy only when a new git tag is pushed
# otherwise it will deploy on every push
- if [[ ${TRAVIS_TAG} =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ]] ; then echo deploying tag ${TRAVIS_TAG} ; else exit 0 ; fi
- echo ${DOCKER_PASSWORD} | docker login -u "${DOCKER_USERNAME}" --password-stdin
- make push ARCH=${ARCH} DOCKER_REPO=${DOCKER_REPO}
- go get github.com/estesp/manifest-tool
- make manifest DOCKER_REPO=${DOCKER_REPO}