PTU5KAS/.travis.yml
Henning Schild fafc017392 tests: add a testcase for applying patches
This adds a test where we clone a git and a hg repo and apply a single
patch and later a quilt series on each of them.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-08-20 17:54:15 +02:00

56 lines
1.5 KiB
YAML

language: python
python:
- "3.4"
- "3.5"
- "3.6"
sudo: required
services:
- docker
addons:
apt:
packages:
- mercurial
install:
# install kas to have all kas dependencies:
- pip install .
# checkcode dependencies:
- pip install flake8 pycodestyle 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
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