-
Notifications
You must be signed in to change notification settings - Fork 38
/
.travis.yml
executable file
·95 lines (93 loc) · 4.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
sudo: required
env:
global:
- DIST_REPO="f5-openstack-agent-dist"
- PKG_VERSION=$(python -c "import f5_openstack_agent; print f5_openstack_agent.__version__")
- PKG_RELEASE=$(python ${DIST_REPO}/scripts/get-version-release.py --release)
- PKG_RELEASE_EL7=${DIST_REPO}/rpms/build/f5-openstack-agent-${PKG_VERSION}-${PKG_RELEASE}.el7.noarch.rpm
- PKG_RELEASE_1404=${DIST_REPO}/deb_dist/python-f5-openstack-agent_${PKG_VERSION}-${PKG_RELEASE}_1404_all.deb
- |
if [[ "$TRAVIS_BRANCH" == *"-stable" ]]; then
export CTLR_VERSION=v$(echo $TRAVIS_BRANCH | sed s/-stable//g)
elif [[ "$TRAVIS_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]* ]]; then
va=( ${TRAVIS_BRANCH//./ } ) # replace decimals and split into array
export CTLR_VERSION="${va[0]}.${va[1]}"
else
export CTLR_VERSION=$TRAVIS_BRANCH
fi
services:
- docker
language: python
python:
- '2.7'
before_install:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis F5 Openstack"
- docker pull f5devcentral/containthedocs:latest
install:
- pip install tox
- pip install -r requirements.style.txt
script:
- pep257 ./test/functional/neutronless/esd/test_esd.py
- flake8 --ignore=H304 ./test/functional/neutronless/esd/test_esd.py
- pep257 ./test/functional/neutronless/esd/conftest.py
- flake8 --ignore=H304 ./test/functional/neutronless/esd/conftest.py
- pep257 ./test/functional/neutronless/esd/test_esd_pairs.py
- flake8 --ignore=H304 ./test/functional/neutronless/esd/test_esd_pairs.py
- flake8 ./f5_openstack_agent
- tox -e unit
- python f5-openstack-agent-dist/scripts/universal_truth.py
- echo "setup.cfg:"
- cat setup.cfg
- echo "stdeb.cfg:"
- cat f5-openstack-agent-dist/deb_dist/stdeb.cfg
- f5-openstack-agent-dist/scripts/package_agent.sh "redhat" "7"
- f5-openstack-agent-dist/scripts/package_agent.sh "redhat" "6"
- f5-openstack-agent-dist/scripts/package_agent.sh "ubuntu" "14.04"
- sudo chown -R travis:travis ${DIST_REPO}/rpms/build
- sudo chown -R travis:travis ${DIST_REPO}/deb_dist/*.deb
- f5-openstack-agent-dist/scripts/test_install.sh "redhat" "7" ${PKG_RELEASE_EL7}
- f5-openstack-agent-dist/scripts/test_install.sh "ubuntu" "14.04" ${PKG_RELEASE_1404}
- ./docs/scripts/docker-docs.sh ./docs/scripts/test-docs.sh
after_success:
- md5sum ${PKG_RELEASE_EL7} > ${PKG_RELEASE_EL7}.md5 && md5sum --check ${PKG_RELEASE_EL7}.md5
- md5sum ${PKG_RELEASE_1404} > ${PKG_RELEASE_1404}.md5 && md5sum --check ${PKG_RELEASE_1404}.md5
deploy:
- provider: releases
api_key:
secure: lTash9wrbwY5rsdl+ZfhYZ+Iqt2EdvZNqrq6FlLT6L4Wc4/RYCDLFwY2qrDb/n1XI3g/XhOCTyYMCu9URrw0HAY45HcAgOcEABNcAGfs/aBk5uB+l/V/42QKB+oAR9RR9qves5PJGBpJcBym9oswcxblBo8L6Z2o/yFzyGo3tHKVopTZoIw+hPqt5eAClPz8FX0ZIUZqH1iUiqMj1JJWvO9DRWECcjt4pr5HuY3u32qocQP4DUY1WQwI/R6iye5VPTAbWnsIBChJcJF1HAbsVa5IhQHhSo03RCJwZay/NF0btc9dKvIyrwqhQIUZX/RcDPvbs7TP02zg9O27HBAts2ivVRoBulN9dsHGiWGXMMQjavZGsdZ/TddKQxUvWoUKv+nHQyWGbyrE4smDHrex29NR/WgB/kHSAkNyUU1rZs8ALaoab5LY3Z0WmrFlHFs4HDb4YG+//0ODVppRe+Z8uFFnSsN4fjG9Xok+Tl+Gb9XM6/LNu+C+5DCG2VfPCnp2UGzmmo9Hm6ODhWauCR9DfJk1dUTVYb871I3ina0rwm2NQ04bKv0UHGZ2FWpq/KGx+jvXW8F54cWIluU/ze2MrJF/z9uKyTluEbDNBEr9/LaZoG22MBzHZB4xK0cEy+CSwGdOredCDCyEM7dsLlnE8ruiujbCAMvdjsHH4bu4MjU=
file:
- ${PKG_RELEASE_EL7}
- ${PKG_RELEASE_EL7}.md5
- ${PKG_RELEASE_1404}
- ${PKG_RELEASE_1404}.md5
skip_cleanup: true
overwrite: true
on:
repo: F5Networks/f5-openstack-agent
tags: true
- provider: pypi
user: $PYPI_USER
password: $PYPI_PASSWORD
distributions: "sdist bdist"
server: https://pypi.python.org/pypi
on:
all_branches: true
tags: true
python: 2.7
skip_cleanup: true
- provider: script
skip_cleanup: true
on:
all_branches: true
repo: F5Networks/f5-openstack-agent
condition: $TRAVIS_BRANCH == *"-stable" || "$TRAVIS_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]*
script:
- ./build-tools/deploy-docs.sh publish-product-docs-to-prod openstack/agent v$CTLR_VERSION
notifications:
slack:
rooms:
- f5openstackdev:$SLACK_TOKEN#f5-openstack-agent
- f5openstackdev:$SLACK_TOKEN#build_status
on_success: change
on_failure: always