8b91666943
We just need to lift the dist for that target to xenial - but not to bionic because 3.4 is then no longer supported. In xenial, mercurial is part of travis image. Additionally installing it is not needed and actually breaks things. But things are more complicated because hg is under /usr/local/bin, and kas used a built-in PATH for tools that does not include this. At this chance, remove "sudo: required" - no longer needed. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
language: python
|
|
dist: xenial
|
|
|
|
python:
|
|
- "3.4"
|
|
- "3.5"
|
|
- "3.6"
|
|
- "3.7"
|
|
|
|
services:
|
|
- docker
|
|
|
|
install:
|
|
# install kas to have all kas dependencies:
|
|
- pip install .
|
|
# checkcode dependencies:
|
|
- pip install flake8 pycodestyle doc8 Pygments
|
|
# test dependencies:
|
|
- pip install -U pytest
|
|
# workaround, needed because kas uses a cleaned-up PATH internally
|
|
- sudo ln -s /usr/local/bin/hg /usr/bin/
|
|
|
|
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
|
|
if [ "$TRAVIS_BRANCH" == "$TAG" ]; then
|
|
docker tag $IMAGE $IMAGE:$TAG;
|
|
docker push $IMAGE:$TAG;
|
|
docker tag $IMAGE $IMAGE:latest-release;
|
|
docker push $IMAGE:latest-release;
|
|
elif [ "$TRAVIS_BRANCH" == "next" ]; then
|
|
docker tag $IMAGE $IMAGE:next;
|
|
docker push $IMAGE:next;
|
|
else
|
|
docker push $IMAGE;
|
|
fi
|
|
done
|
|
;;
|
|
esac
|