forked from odavid/jenkins-jnlp-slave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.sh
executable file
·24 lines (21 loc) · 928 Bytes
/
publish.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
set -e -o pipefail
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
if [[ -n $TRAVIS_TAG ]]; then
TAG=${TRAVIS_TAG/v/}
echo "publish $TAG"
docker tag odavid/jenkins-jnlp-slave odavid/jenkins-jnlp-slave:${TAG}
docker tag odavid/jenkins-jnlp-slave:alpine odavid/jenkins-jnlp-slave:${TAG}-alpine
docker tag odavid/jenkins-jnlp-slave:debian odavid/jenkins-jnlp-slave:${TAG}-debian
docker tag odavid/jenkins-jnlp-slave:jdk11 odavid/jenkins-jnlp-slave:${TAG}-jdk11
docker push odavid/jenkins-jnlp-slave:${TAG}
docker push odavid/jenkins-jnlp-slave:${TAG}-alpine
docker push odavid/jenkins-jnlp-slave:${TAG}-debian
docker push odavid/jenkins-jnlp-slave:${TAG}-jdk11
else
echo "publish latest"
docker push odavid/jenkins-jnlp-slave
docker push odavid/jenkins-jnlp-slave:alpine
docker push odavid/jenkins-jnlp-slave:debian
docker push odavid/jenkins-jnlp-slave:jdk11
fi