forked from Cytomine-ULiege/Cytomine-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
89 lines (80 loc) · 4.97 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
sudo: required
services:
- docker
language: python
python:
- "2.7"
- "3.5"
cache:
directories:
- "$HOME/.cache"
env:
global:
- DOCKER_USERNAME=cytomineulg
- secure: "HlLEI3l37JxT0KWhmIyBaw1dmfmB0b1Dz1yFNP83IZuHFDumb33XG74lTkZpcoL16y5dogqFDgYkiCH6R5cBC7GS/OS+xD1aDPodFqEdjTqCMZRZsK5eTG0xW2Bs0nuu9igKos9yMM3/HE+bfKRZ+Qt8Ke+/0xcWvEfk1JRdAvuW/sRWnyADnZ4ScoxJl74cVoYHxu3cu47WvecHn4w9hFeHzBWQI7rihexjBWTQoovc9vP6B/camtCAo/++aXxn13hsJAlhvEhuJ3JnDLzXi5FCi69FKblbkB/7tz5U4hSRdg56pPwsu5cKMWCptAlehs6L+eH6UXJi8zioqm/AThe9nweTk/G/9Q7JSY14Fnkmgmp0tMcFLyh+SR2ntsDs/HqPQsZszvBijFaIueYutas6wzjVwT/Z5SriwU7DjXx1G30XMT+e14or3xC1LupERapnW1X9wk05d2SHfk5S/YAI9C+bUFm7gPGetMm80eUtru082ITEzTiGtJowFnvyszWz8rpTqbop5ggqgGIH6C7094Cp+/xDUaWTKfuInyKoF1Nx36/qfOqMlHbgFoHp9U7eedkZ/H2u5/nK9BW+4pPRHpyLJHmVffByyYMM7Ys8JcP/hF7qN8ziuETaxdRb+yHnR5mg7I5Xh1JRt9eQV2vxviDiZtZ9noAW7Q3XNvc="
install:
- pip install -r requirements.txt
- pip install wheel
script:
- echo "Skip tests !" #pytest
after_success:
- python setup.py bdist_wheel --universal
- python setup.py bdist_egg
- python setup.py sdist --formats=gztar,zip
- git fetch --tags
- export VERSION=$(python -W ignore setup.py --version)
- export DEPLOY=false
- >
if [[ ! $(git tag -l v$VERSION) ]]; then
git config --local user.name "$(git log -1 --pretty=format:'%an')";
git config --local user.email "$(git log -1 --pretty=format:'%ae')";
git tag "v$VERSION";
export DEPLOY=true;
echo "Deploy with version $VERSION";
cp dist/*.zip docker/;
export PY3_VERSION=3.6.8;
export PY2_VERSION=2.7.15;
docker build --build-arg RELEASE_PATH="." --build-arg VERSION=$VERSION --build-arg PYTHON_VERSION=$PY3_VERSION -t cytomineuliege/software-python3-base:v$VERSION-py$PY3_VERSION -t cytomineuliege/software-python3-base:latest docker/;
docker build --build-arg RELEASE_PATH="." --build-arg VERSION=$VERSION --build-arg PYTHON_VERSION=$PY3_VERSION-slim -t cytomineuliege/software-python3-base:v$VERSION-py$PY3_VERSION-slim docker/;
docker build --build-arg RELEASE_PATH="." --build-arg VERSION=$VERSION --build-arg PYTHON_VERSION=$PY2_VERSION -t cytomineuliege/software-python2-base:v$VERSION-py$PY2_VERSION -t cytomineuliege/software-python2-base:latest docker/;
docker build --build-arg RELEASE_PATH="." --build-arg VERSION=$VERSION --build-arg PYTHON_VERSION=$PY2_VERSION-slim -t cytomineuliege/software-python2-base:v$VERSION-py$PY2_VERSION-slim docker/;
fi;
deploy:
- provider: script
script: >
echo $VERSION &&
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" &&
docker push cytomineuliege/software-python3-base:v$VERSION-py$PY3_VERSION &&
docker push cytomineuliege/software-python3-base:v$VERSION-py$PY3_VERSION-slim &&
docker push cytomineuliege/software-python3-base:latest &&
docker push cytomineuliege/software-python2-base:v$VERSION-py$PY2_VERSION &&
docker push cytomineuliege/software-python2-base:v$VERSION-py$PY2_VERSION-slim &&
docker push cytomineuliege/software-python2-base:latest &&
echo "Done."
skip_cleanup: true
on:
python: 3.5
condition: $DEPLOY = true
- provider: releases
api_key:
secure: iwv5loqGr4smy+C1merhBDzflUKooaI/RhFFHjNha55spRPMLNUlR41dg6DWcJBOniQSQo0WUZVJH4VLxsOvJLc5w8+d3toYycHhWWM+v7frI78vYequBQrJ6e7X0MHmacxE4mqg6r0QrDrmnnDH3469zYupx4YNGXQztdc6raATgsni8tVXvB3jYYcRz6rhGwP+PzWnUPhvkakAsXsDFCA8DNkz71ewmZ0ho8CwQ9CPUBgqNJrIt5cJ+57kjIxj940T++V2lw+7lyo9UaCpqmvvogeie8PN05NWDqnq+HfORFWTODCRZVgFmxYaKLUkgNLmXP5Vp+/YLM8y4LB20fhW08VdCB7pD+CUGD6LhSOGAWp3c36hBx/nX8TjfgiS0L7TiBwF4cp+WHMIcToZovDubesrkxN2AwvaETUt8C/pQvALVSYuIf9t65y1Y0g6j0XWgZ4gYr/FTTvpNCkCgDVbllRagx8zHSk8UTa0ejGIOJh5Cv549MXRCpOvPSc36/oaqrKkwmvJG9fJu8HMnjyA/AbP5QwZYJyp6CcxvKnmsk96DG0QuunFb7QorUSbR3AFeGsADGgehY6Skoez6p3fnfNlJ3RsYOlUqL9h5v43ihwzPsndh3Qq0/R9tuyts8eAFkHpqsS8VBLu23iXYnmFaYzJ1FHEtqRg2KG/AKs=
file_glob: true
file: "dist/*.{zip,tar,gz}"
skip_cleanup: true
on:
python: 3.5
condition: $DEPLOY = true
- provider: packagecloud
username: cytomine-uliege
repository: Cytomine-python-client
token: "${PACKAGECLOUD_TOKEN}"
dist: "python"
package_glob: "dist/*.{whl,egg,egg-info,tar,gz}"
skip_cleanup: true
on:
python: 3.5
condition: $DEPLOY = true
notifications:
email: false
slack:
secure: TrdyGx56LOXEzrMxZgMhnYwpLQjIX3fL40YYujq40W66Rcis6nm2SP4i0By3fOSwwKcRwP8HXvs219sZddL3KJSZ0ormMvLHVjo9NNEbUAHqWVUBnaNJjF6ANmRFpuIKkVRTu2LQHaJhjMFyrKg8VVRAxNR1keaOsVeb4/U6gLF9LqfMciz56TtoDzfbMfB0V7l+RtUfRpeKGjDqp+lAEIzueSRItK49hP4gACGxJEMACIG+z1PZNLtVTnV6DokqnVmhUBIo9+ikLmU8g48Ark6hmj0JC5zZHK+LwZUhlMeJmPsJMydJ0ZPiOzcdPhQoLZC5looGFYPru2Igu3GTIM/hoTCDIYUCYRStr0vRF4niEEWMXKp9NJUQHkK0RwPCsuc0iwl1Jaeh9+qSEUeEW3tYyRgNwBPI4YK/XFt1/oDHufi8xU50xVTysSOxVJWbZ29OVdJ4LtWrF5rdKiFfl54sAqEnVREp8QcvRFXLMwL89cW5omi4xqmlojLm1pS/6DthlrED7dMz8qQi43shOPQbVqA+TRRUXl7jPo4DNTbI/8KfJGXg76scytZB4qUx4t6j2C9YxllHEZf7nlNyvHQzTLrcNOB6kxYFOibdrWIm1TycpbIBkb3l/1ZP0MgVFLpEu89eYcCpk29g6QkdyMU6Pb69avq4c9HUk0WhGME=