PTU5KAS/.travis.yml
Jan Kiszka 1e11d314e8 travis: Fix upload of releases
Yeah, that was "too simple to possibly fail". Consequently, the release
revealed two issues: The script only looked for annotated tags but they
are not used so far. Moreover, the TRAVIS_BRANCH name of a tag is that
tag and neither "master" or "next".

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2017-07-12 10:22:15 +02:00

45 lines
1.1 KiB
YAML

language: python
python:
- "3.4"
- "3.5"
- "3.6"
sudo: required
services:
- docker
install:
# install kas to have all kas dependencies:
- pip install .
# checkcode dependencies:
- pip install pylint pep8 doc8 Pygments
# test dependencies:
- pip install pytest
script:
- scripts/checkcode.sh .
- pytest
jobs:
include:
- stage: docker
python: "3.6"
script:
- docker build -t kasproject/kas .
- docker build -t kasproject/kas-isar -f Dockerfile.isar .
- 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
docker push $IMAGE;
if [ "$TRAVIS_BRANCH" == "$TAG" ]; then
docker tag $IMAGE $IMAGE:$TAG;
docker push $IMAGE:$TAG;
fi
done
;;
esac