зеркало из https://github.com/mozilla/mig.git
35 строки
1.1 KiB
YAML
35 строки
1.1 KiB
YAML
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
|