2017-06-28 14:48:43 +02:00
|
|
|
language: python
|
|
|
|
|
|
|
|
python:
|
|
|
|
- "3.4"
|
|
|
|
- "3.5"
|
|
|
|
- "3.6"
|
|
|
|
|
2017-06-17 23:40:15 +02:00
|
|
|
sudo: required
|
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2017-06-28 14:48:43 +02:00
|
|
|
install:
|
|
|
|
# install kas to have all kas dependencies:
|
|
|
|
- pip install .
|
|
|
|
# checkcode dependencies:
|
2017-06-28 14:48:46 +02:00
|
|
|
- pip install pylint pep8 doc8 Pygments
|
2017-07-05 16:27:41 +02:00
|
|
|
# test dependencies:
|
|
|
|
- pip install pytest
|
2017-06-28 14:48:43 +02:00
|
|
|
|
2017-06-17 23:40:15 +02:00
|
|
|
script:
|
2017-06-28 14:48:43 +02:00
|
|
|
- scripts/checkcode.sh .
|
2017-07-05 16:27:41 +02:00
|
|
|
- pytest
|
2017-06-17 23:40:15 +02:00
|
|
|
|
2017-07-07 20:22:49 +02:00
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: docker
|
|
|
|
python: "3.6"
|
|
|
|
script:
|
|
|
|
- docker build -t kasproject/kas .
|
|
|
|
- docker build -t kasproject/kas-isar -f Dockerfile.isar .
|
2017-07-10 21:23:46 +02:00
|
|
|
- TAG=`git describe --exact-match --tags 2>/dev/null || echo "<none>"`
|
|
|
|
- case "$TRAVIS_BRANCH" in
|
|
|
|
master|next|"$TAG")
|
|
|
|
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
|
|
|
|
for IMAGE in kasproject/kas kasproject/kas-isar; do
|
|
|
|
if [ "$TRAVIS_BRANCH" == "$TAG" ]; then
|
|
|
|
docker tag $IMAGE $IMAGE:$TAG;
|
|
|
|
docker push $IMAGE:$TAG;
|
2017-07-10 21:23:47 +02:00
|
|
|
elif [ "$TRAVIS_BRANCH" == "next" ]; then
|
|
|
|
docker tag $IMAGE $IMAGE:next;
|
|
|
|
docker push $IMAGE:next;
|
|
|
|
else
|
|
|
|
docker push $IMAGE;
|
2017-07-10 21:23:46 +02:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
;;
|
|
|
|
esac
|