-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
76 lines (66 loc) · 1.99 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
sudo: required
services:
- docker
language: python
stages:
- test
- delivery
- submit
jobs:
include:
- stage: test
python: 2.7
env: TOXENV=py27-codeclimate
install:
- pip install tox
script:
- tox
- stage: test
python: 3.6
env: TOXENV=py36-codeclimate
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
install:
- pip install tox
script:
- tox
after_script:
- mv tests/coverage.xml .
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT tests/coverage.xml
- stage: delivery
if: type != pull_request AND branch = master
env:
- FOLDER=/package
- PACKAGE_NAME=python-cluster-preflight-check
- TAR_NAME=cluster_preflight_check
before_install:
- docker pull shap/continuous_deliver:latest
script:
- |
docker run -t -v "$(pwd):/package" \
-e OBS_USER=$OBS_USER \
-e OBS_PASS=$OBS_PASS \
-e FOLDER=$FOLDER \
-e OBS_PROJECT=$OBS_PROJECT \
-e PACKAGE_NAME=$PACKAGE_NAME \
-e TAR_NAME=$TAR_NAME \
shap/continuous_deliver \
/bin/bash -c "cd /package;/scripts/upload.sh"
- stage: submit
if: type != pull_request AND branch = master
env:
- PACKAGE_NAME=python-cluster-preflight-check
before_install:
- docker pull shap/continuous_deliver:latest
script:
- |
docker run -t -v "$(pwd):/package" \
-e OBS_USER=$OBS_USER \
-e OBS_PASS=$OBS_PASS \
-e OBS_PROJECT=$OBS_PROJECT \
-e PACKAGE_NAME=$PACKAGE_NAME \
-e TARGET_PROJECT=$TARGET_PROJECT \
shap/continuous_deliver \
/bin/bash -c "cd /package;/scripts/submit.sh"