Fix tag and version for images

If the commit of the repo is the same as the commit of the tag,
the image will not be stored in registry if a newer image if build
after a newer commit.

Change-Id: I1181f2ac3ba45145ea406aefc33e4433ade50df2
diff --git a/docker-build-image-pipeline.groovy b/docker-build-image-pipeline.groovy
index d3b3640..926fd88 100644
--- a/docker-build-image-pipeline.groovy
+++ b/docker-build-image-pipeline.groovy
@@ -37,9 +37,9 @@
           def tag = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
           def revision = sh(script: "git describe --tags --abbrev=4 | grep -oP \"^${tag}-\\K.*\" | awk -F\\- '{print \$1}'", returnStdout: true).trim()
           imageTagsList << tag
-          if (revision != "") {
-            imageTagsList << "${tag}-${revision}"
-          }
+          revision = revision ? revision : "0"
+          imageTagsList << "${tag}-${revision}"
+
           if (!imageTagsList.contains("latest")) {
             imageTagsList << "latest"
           }