jasonpet closed pull request #89: push a hashcommit of the image in travis
publish
URL: https://github.com/apache/incubator-openwhisk-runtime-nodejs/pull/89
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/tools/travis/publish.sh b/tools/travis/publish.sh
index cfdd8d3..74acdb2 100755
--- a/tools/travis/publish.sh
+++ b/tools/travis/publish.sh
@@ -46,4 +46,16 @@ TERM=dumb ./gradlew \
-PdockerRegistry=docker.io \
-PdockerImagePrefix=${IMAGE_PREFIX} \
-PdockerImageTag=${IMAGE_TAG}
+
+ # if doing latest also push a tag with the hash commit
+ if [ ${IMAGE_TAG} == "latest" ]; then
+ SHORT_COMMIT=`git rev-parse --short HEAD`
+ TERM=dumb ./gradlew \
+ :core:${RUNTIME}:distDocker \
+ -PdockerRegistry=docker.io \
+ -PdockerImagePrefix=${IMAGE_PREFIX} \
+ -PdockerImageTag=${SHORT_COMMIT}
+ fi
+
+
fi
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services