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>
This commit is contained in:
parent
6bc7715f15
commit
1e11d314e8
24
.travis.yml
24
.travis.yml
@ -29,14 +29,16 @@ jobs:
|
||||
script:
|
||||
- docker build -t kasproject/kas .
|
||||
- docker build -t kasproject/kas-isar -f Dockerfile.isar .
|
||||
- if [ "$TRAVIS_BRANCH" == "master" ] || [ "$TRAVIS_BRANCH" == "next" ]; then
|
||||
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
|
||||
for IMAGE in kasproject/kas kasproject/kas-isar; do
|
||||
docker push $IMAGE;
|
||||
if [ "$TRAVIS_BRANCH" == "master" ] && git describe --exact-match 2>/dev/null >/dev/null; then
|
||||
VERSION="$(/usr/bin/python3 -c 'from kas import __version__; print(__version__)')";
|
||||
docker tag $IMAGE $IMAGE:$VERSION;
|
||||
docker push $IMAGE:$VERSION;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
- 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
|
||||
|
Loading…
Reference in New Issue
Block a user