This repository has been archived by the owner on Mar 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 392
/
.travis.yml
55 lines (55 loc) · 1.87 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
language: python
dist: trusty
sudo: required
group: deprecated-2017Q4
env:
matrix:
- BASE_DISTRO: centos:7
- BASE_DISTRO: fedora:27
- BASE_DISTRO: fedora:26
- BASE_DISTRO: fedora:25
# - BASE_DISTRO: amazonlinux:2
- BASE_DISTRO: debian:jessie
- BASE_DISTRO: debian:stretch
- BASE_DISTRO: debian:wheezy
- BASE_DISTRO: ubuntu:precise
- BASE_DISTRO: ubuntu:trusty
- BASE_DISTRO: ubuntu:xenial
- BASE_DISTRO: ubuntu:bionic
- BASE_DISTRO: ubuntu:artful
- BASE_DISTRO: alpine:3.5
- BASE_DISTRO: alpine:3.4
services:
- docker
before_install:
- sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports universe'
- sudo apt-get update -qq
- pip install --upgrade setuptools
- pip install 'ansible>=2.3'
- ansible --version
- pip install -U --force-reinstall -r requirements.txt
- pip install -e .[docker]
- mkdir tmp
- export TMPDIR=${PWD}/tmp
script:
- python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
- python ./setup.py prebake --distros ${BASE_DISTRO} --debug
- python ./setup.py test --ansible-args="-vvv"
- if [ -f ./task.output ]; then cat task.output; fi
- |
if [ "${TRAVIS_PULL_REQUEST}" == "false" ] && [ "${DOCKER_HUB_USER}" != "" ]; then
if [ "${TRAVIS_BRANCH}" == "develop" ] || [ "${TRAVIS_BRANCH}" == "master" ]; then
# If not a PR, and secrets exist, create and push the prebake
export DOCKER_CONFIG=${PWD};
docker login -u ${DOCKER_HUB_USER} -p ${DOCKER_HUB_PASSWORD};
python ./bakery.py;
fi
fi
after_success:
- bash <(curl -s https://codecov.io/bash) -F unit -f test/reports/unit/coverage.xml
- bash <(curl -s https://codecov.io/bash) -F integration -f test/reports/integration/coverage.xml
after_failure:
- docker logs `docker ps -lq`
- docker inspect `docker ps -lq`
notifications:
email: false