forked from mozilla/mig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
34 lines (34 loc) · 1.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
language: go
go:
- 1.8
go_import_path: mig.ninja/mig
addons:
postgresql: "9.5"
notifications:
irc:
channels:
- "irc.mozilla.org#mig"
services:
- docker
before_install:
# this is a fix to get rng-tools to work in travis-ci
- sudo apt-get update -qq
- sudo apt-get install --yes rng-tools autoconf automake gcc
- sudo rm -f /dev/random
- sudo mknod -m 0666 /dev/random c 1 9
- echo HRNGDEVICE=/dev/urandom | sudo tee /etc/default/rng-tools
- sudo /etc/init.d/rng-tools restart
script:
- make test
- docker build -t mozilla/mig .
- docker run -e MIGMODE=test mozilla/mig
- |
if [ ! -z "$TRAVIS_TAG" ]; then
# If a TRAVIS_TAG is set, this build follows a git tag --push and should trigger
# a release of a tagged container to dockerhub. Otherwise, we tag as latest.
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
docker tag mozilla/mig mozilla/mig:${TRAVIS_TAG}
docker tag mozilla/mig mozilla/mig:latest
docker push mozilla/mig
fi
docker logout