-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
154 lines (149 loc) · 9.09 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
language: python
sudo: true
python:
- '3.6'
- '3.5'
- '3.4'
- '2.7'
services:
- mongodb
install:
# Install all Python requirements (application and tests)
- ./test/setup_test.sh
# To help eventual debug: knowing which exact versions are in use can be rather useful.
- pip freeze
script:
# Code dynamic analysis and tests
- cd test
# Run test suite with py.test running its coverage plugin - for backend client library
- pytest -v --cov=alignak_backend_client test_*.py
# Run test suite with py.test running its coverage plugin - for alignak-backend-cli utility
- pytest -v --cov=backend_client --cov-config .coveragerc --cov-append alignak-backend-cli-tests.py
# Report about coverage - Upload coverage results to codecov
- bash <(curl -s https://codecov.io/bash)
- cd ..
after_success:
# to get coverage data with relative paths and not absolute we have to
# execute coveralls from the base directory of the project,
# so we need to move the .coverage file here :
- mv test/.coverage . && coveralls --rcfile=test/.coveragerc
- ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION
jobs:
include:
- stage: Coding standard
python: 3.6
script:
# Code static analysis
- pycodestyle --max-line-length=100 --exclude='*.pyc, *.cfg, *.log' --ignore='E402' alignak_backend_client/*
- pylint --rcfile=.pylintrc alignak_backend_client/
- pep257 --select=D300 alignak_backend_client
- stage: Pypi deployment
python: 3.6
script: echo "Deploying to PyPi..."
if: (tag IS present)
deploy:
- provider: pypi
distributions: "sdist bdist_wheel"
skip_existing: true
user: alignak
password:
secure: "xoWxthi5hTXh9Uim+zVBLb066zXxAE7QGY7p6NXgNrBOrKdmbY3xQYuI6WcnIeyAxJieI/bF178HlXXXc2w/jmGYkI0BJO0jz8x0De0pCsbOX/z8eORv4z6Yg0wc/5Ojtmc4Ud5q8EUFy2xOrnvFKXPmxN2J85ibavut7OUhZcSshyMYrUfks1+Mki3yChi5uitj2n5Aq6LQBGintXCcgkfEsxx2v9z8wz39fl44clwrZsQkyL4dzzT1ItSGGnhvO1e4YBNogLLNOuCmBIN+ISesObN9rMu+GJBgakwa7/FdJpDQM/5xSSM4/n+qYTi8JG2CSJOJtYWGeBOwG58jL+E9X9YHOBBBMfDdzeHMer4P3gTjmXG4zNgw7OTA1XpxiP8FWWB28OwByCeCsO3V6C7KzcaIs1ZOpT3NXx99BDScqZvp9cnerfZOZKugUikWMPABuSWOYnz7RNG2eJCoWwZWVgpgAvZKTpuOllvibuRr2MYtMHjH0bdqGoa5TzqCNP0XrP+g5Iuz8lIn32Uyq+p6gBm8wz9XEeG+Azo8zMF5HMJyos/0T5+0gw+9GjjH/G8tX0Lkg19OoyWDalCWGJ9G3rweSaXTZKjOyZu1c48W1SsyipAfGtkSq/qbFpETsIh/U4ewwYU0QDpglVoMBBP7jYSo0B9o1d2NQwN+mJQ="
on:
branch: develop
tags: true
- stage: Debian packaging - Python 2
python: 2.7
if: (tag IS blank)
script:
- echo "Packaging for BinTray..."
- ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION deb
deploy:
- provider: bintray
skip_cleanup: true
file: dist/.bintray-deb.json
on:
all_branches: true
user: mohierf
key:
secure: "TQTqUIqMpMz6EKZmklH+19kYBqsHcxjPFPDCwBs1OoLrYcp3E+MxVf8JKnqbtZGXAeHttAUwIftSBCe+IkbUmEZLvUEutpDaGpBZAqZb07U+WilAslkW8WjWO6PQVzjry6dbf1H3LFb79uB1cXFaKQV8qtJpv5DL2i+9HvGSl7C9Z+d2K6ccrGQmUThQqvdSfhoBDsBWeO65ccX+32eomHzm8tDL9RXifRXa+z8R1QPpAYqztnuzuaqf8kuDRTROYvXIz4uwjSyqP6kaeUl+IObMg8yUXh0WilXFhUtku4geitcCOZ+oGAxe4R5wEhaZbo/jL4u4yD+gd0uk5XlPASkqUB7w6WSly2zll4A7JR4ZnbCssz0ekNyIBSNIzlrCDGxTs59vQ/lXb7wgat40CbMwJmp9smks4CV5aDU1t6O8+wtXuBy9hXTE4mI3Ny5yoFKd49FE71vmWwpMbkby5XKk4NEHFtKCPoMlLwulZ6cwr7WllimoksZl3aYBqnVT0QugjA72qIZLOQgHpGJ/xRSVOyO2L9kJmmpBHSH5jyqt9EZtOKazz/wGv/5hA2cX2IMfo9DxeQmxf6pb7OUCd6u0nMte75hNfaZlyAis6OHWinYCjmtWTeo1AZO8Iuopxlf69plU8WWfbOwzsYJ2zlj/62+cLxQIVhrXQoQsPGg="
- stage: Debian packaging - Python 3
python: 3.6
if: (tag IS blank)
script:
- echo "Packaging for BinTray..."
- ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION deb
deploy:
- provider: bintray
skip_cleanup: true
file: dist/.bintray-deb.json
on:
all_branches: true
user: mohierf
key:
secure: "TQTqUIqMpMz6EKZmklH+19kYBqsHcxjPFPDCwBs1OoLrYcp3E+MxVf8JKnqbtZGXAeHttAUwIftSBCe+IkbUmEZLvUEutpDaGpBZAqZb07U+WilAslkW8WjWO6PQVzjry6dbf1H3LFb79uB1cXFaKQV8qtJpv5DL2i+9HvGSl7C9Z+d2K6ccrGQmUThQqvdSfhoBDsBWeO65ccX+32eomHzm8tDL9RXifRXa+z8R1QPpAYqztnuzuaqf8kuDRTROYvXIz4uwjSyqP6kaeUl+IObMg8yUXh0WilXFhUtku4geitcCOZ+oGAxe4R5wEhaZbo/jL4u4yD+gd0uk5XlPASkqUB7w6WSly2zll4A7JR4ZnbCssz0ekNyIBSNIzlrCDGxTs59vQ/lXb7wgat40CbMwJmp9smks4CV5aDU1t6O8+wtXuBy9hXTE4mI3Ny5yoFKd49FE71vmWwpMbkby5XKk4NEHFtKCPoMlLwulZ6cwr7WllimoksZl3aYBqnVT0QugjA72qIZLOQgHpGJ/xRSVOyO2L9kJmmpBHSH5jyqt9EZtOKazz/wGv/5hA2cX2IMfo9DxeQmxf6pb7OUCd6u0nMte75hNfaZlyAis6OHWinYCjmtWTeo1AZO8Iuopxlf69plU8WWfbOwzsYJ2zlj/62+cLxQIVhrXQoQsPGg="
- stage: RPM packaging - Python 2
python: 2.7
if: (tag IS blank)
install:
- echo "Installing packaging requirements..."
- sudo apt-get install -y rpm
script:
- echo "Packaging for BinTray..."
- ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION rpm
deploy:
- provider: bintray
skip_cleanup: true
file: dist/.bintray-rpm.json
on:
all_branches: true
user: mohierf
key:
secure: "TQTqUIqMpMz6EKZmklH+19kYBqsHcxjPFPDCwBs1OoLrYcp3E+MxVf8JKnqbtZGXAeHttAUwIftSBCe+IkbUmEZLvUEutpDaGpBZAqZb07U+WilAslkW8WjWO6PQVzjry6dbf1H3LFb79uB1cXFaKQV8qtJpv5DL2i+9HvGSl7C9Z+d2K6ccrGQmUThQqvdSfhoBDsBWeO65ccX+32eomHzm8tDL9RXifRXa+z8R1QPpAYqztnuzuaqf8kuDRTROYvXIz4uwjSyqP6kaeUl+IObMg8yUXh0WilXFhUtku4geitcCOZ+oGAxe4R5wEhaZbo/jL4u4yD+gd0uk5XlPASkqUB7w6WSly2zll4A7JR4ZnbCssz0ekNyIBSNIzlrCDGxTs59vQ/lXb7wgat40CbMwJmp9smks4CV5aDU1t6O8+wtXuBy9hXTE4mI3Ny5yoFKd49FE71vmWwpMbkby5XKk4NEHFtKCPoMlLwulZ6cwr7WllimoksZl3aYBqnVT0QugjA72qIZLOQgHpGJ/xRSVOyO2L9kJmmpBHSH5jyqt9EZtOKazz/wGv/5hA2cX2IMfo9DxeQmxf6pb7OUCd6u0nMte75hNfaZlyAis6OHWinYCjmtWTeo1AZO8Iuopxlf69plU8WWfbOwzsYJ2zlj/62+cLxQIVhrXQoQsPGg="
- stage: RPM packaging - Python 3
python: 3.6
if: (tag IS blank)
install:
- echo "Installing packaging requirements..."
- sudo apt-get install -y rpm
script:
- echo "Packaging for BinTray..."
- ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION rpm
deploy:
- provider: bintray
skip_cleanup: true
file: dist/.bintray-rpm.json
on:
all_branches: true
user: mohierf
key:
secure: "TQTqUIqMpMz6EKZmklH+19kYBqsHcxjPFPDCwBs1OoLrYcp3E+MxVf8JKnqbtZGXAeHttAUwIftSBCe+IkbUmEZLvUEutpDaGpBZAqZb07U+WilAslkW8WjWO6PQVzjry6dbf1H3LFb79uB1cXFaKQV8qtJpv5DL2i+9HvGSl7C9Z+d2K6ccrGQmUThQqvdSfhoBDsBWeO65ccX+32eomHzm8tDL9RXifRXa+z8R1QPpAYqztnuzuaqf8kuDRTROYvXIz4uwjSyqP6kaeUl+IObMg8yUXh0WilXFhUtku4geitcCOZ+oGAxe4R5wEhaZbo/jL4u4yD+gd0uk5XlPASkqUB7w6WSly2zll4A7JR4ZnbCssz0ekNyIBSNIzlrCDGxTs59vQ/lXb7wgat40CbMwJmp9smks4CV5aDU1t6O8+wtXuBy9hXTE4mI3Ny5yoFKd49FE71vmWwpMbkby5XKk4NEHFtKCPoMlLwulZ6cwr7WllimoksZl3aYBqnVT0QugjA72qIZLOQgHpGJ/xRSVOyO2L9kJmmpBHSH5jyqt9EZtOKazz/wGv/5hA2cX2IMfo9DxeQmxf6pb7OUCd6u0nMte75hNfaZlyAis6OHWinYCjmtWTeo1AZO8Iuopxlf69plU8WWfbOwzsYJ2zlj/62+cLxQIVhrXQoQsPGg="
# - stage: FreeBSD packaging - Python 2
# python: 2.7
# if: (tag IS blank)
# script:
# - echo "Packaging for BinTray..."
# - ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION freebsd
# deploy:
# - provider: bintray
# skip_cleanup: true
# file: dist/.bintray-freebsd.json
# on:
# all_branches: true
# user: mohierf
# key:
# secure: "TQTqUIqMpMz6EKZmklH+19kYBqsHcxjPFPDCwBs1OoLrYcp3E+MxVf8JKnqbtZGXAeHttAUwIftSBCe+IkbUmEZLvUEutpDaGpBZAqZb07U+WilAslkW8WjWO6PQVzjry6dbf1H3LFb79uB1cXFaKQV8qtJpv5DL2i+9HvGSl7C9Z+d2K6ccrGQmUThQqvdSfhoBDsBWeO65ccX+32eomHzm8tDL9RXifRXa+z8R1QPpAYqztnuzuaqf8kuDRTROYvXIz4uwjSyqP6kaeUl+IObMg8yUXh0WilXFhUtku4geitcCOZ+oGAxe4R5wEhaZbo/jL4u4yD+gd0uk5XlPASkqUB7w6WSly2zll4A7JR4ZnbCssz0ekNyIBSNIzlrCDGxTs59vQ/lXb7wgat40CbMwJmp9smks4CV5aDU1t6O8+wtXuBy9hXTE4mI3Ny5yoFKd49FE71vmWwpMbkby5XKk4NEHFtKCPoMlLwulZ6cwr7WllimoksZl3aYBqnVT0QugjA72qIZLOQgHpGJ/xRSVOyO2L9kJmmpBHSH5jyqt9EZtOKazz/wGv/5hA2cX2IMfo9DxeQmxf6pb7OUCd6u0nMte75hNfaZlyAis6OHWinYCjmtWTeo1AZO8Iuopxlf69plU8WWfbOwzsYJ2zlj/62+cLxQIVhrXQoQsPGg="
# - stage: FreeBSD packaging - Python 3
# python: 3.6
# if: (tag IS blank)
# script:
# - echo "Packaging for BinTray..."
# - ./package.sh $TRAVIS_BRANCH $TRAVIS_PYTHON_VERSION freebsd
# deploy:
# - provider: bintray
# skip_cleanup: true
# file: dist/.bintray-freebsd.json
# on:
# all_branches: true
# user: mohierf
# key:
# secure: "TQTqUIqMpMz6EKZmklH+19kYBqsHcxjPFPDCwBs1OoLrYcp3E+MxVf8JKnqbtZGXAeHttAUwIftSBCe+IkbUmEZLvUEutpDaGpBZAqZb07U+WilAslkW8WjWO6PQVzjry6dbf1H3LFb79uB1cXFaKQV8qtJpv5DL2i+9HvGSl7C9Z+d2K6ccrGQmUThQqvdSfhoBDsBWeO65ccX+32eomHzm8tDL9RXifRXa+z8R1QPpAYqztnuzuaqf8kuDRTROYvXIz4uwjSyqP6kaeUl+IObMg8yUXh0WilXFhUtku4geitcCOZ+oGAxe4R5wEhaZbo/jL4u4yD+gd0uk5XlPASkqUB7w6WSly2zll4A7JR4ZnbCssz0ekNyIBSNIzlrCDGxTs59vQ/lXb7wgat40CbMwJmp9smks4CV5aDU1t6O8+wtXuBy9hXTE4mI3Ny5yoFKd49FE71vmWwpMbkby5XKk4NEHFtKCPoMlLwulZ6cwr7WllimoksZl3aYBqnVT0QugjA72qIZLOQgHpGJ/xRSVOyO2L9kJmmpBHSH5jyqt9EZtOKazz/wGv/5hA2cX2IMfo9DxeQmxf6pb7OUCd6u0nMte75hNfaZlyAis6OHWinYCjmtWTeo1AZO8Iuopxlf69plU8WWfbOwzsYJ2zlj/62+cLxQIVhrXQoQsPGg="