Skip to content

Commit 117e7a4

Browse files
authored
on release/tag builds, push a tagged image
1 parent a01c61d commit 117e7a4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

buildscripts/push

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
set -e
3+
4+
IMAGEID=$( sudo docker images -q openebs/easy-jupyter:ci )
5+
6+
if [ ! -z "${DNAME}" ] && [ ! -z "${DPASS}" ];
7+
then
8+
sudo docker login -u "${DNAME}" -p "${DPASS}";
9+
sudo docker push openebs/easy-jupyter:ci ;
10+
if [ ! -z "${TRAVIS_TAG}" ] ;
11+
then
12+
#Push the release tag image to docker hub repository
13+
#When a git hub is tagged with a release, the travis will
14+
#hold the release tag in env TRAVIS_TAG
15+
sudo docker tag ${IMAGEID} openebs/easy-jupyter:${TRAVIS_TAG}
16+
sudo docker push openebs/easy-jupyter:${TRAVIS_TAG};
17+
sudo docker tag ${IMAGEID} openebs/easy-jupyter:latest
18+
sudo docker push openebs/easy-jupyter:latest;
19+
fi;
20+
else
21+
echo "No docker credentials provided. Skip uploading openebs/easy-jupyter:ci to docker hub";
22+
fi;

0 commit comments

Comments
 (0)