Build VOLTHA containers tagged with VERSION if SemVer

Change-Id: I0e72a7e9666ac22e831882f6ae431c15ccf3af6a
diff --git a/jjb/pipeline/voltha-publish.groovy b/jjb/pipeline/voltha-publish.groovy
index b7c8b26..ba3973e 100644
--- a/jjb/pipeline/voltha-publish.groovy
+++ b/jjb/pipeline/voltha-publish.groovy
@@ -58,9 +58,11 @@
               TAG="${params.manifestBranch}"
             fi
 
-            if [ "${params.releaseTag}" != "" ]
+	    # Check for SemVer in VERSION (only numbers and dots)
+	    RELEASETAG=`cat voltha/VERSION|tr -d ' '|egrep "^[0-9]+(\.[0-9]+)*$"`
+            if [ "\$RELEASETAG" != "" ]
             then
-              VOLTHA_BUILD=docker TAG=\$TAG TARGET_REPOSITORY=voltha/ TARGET_TAG=${params.releaseTag} make push
+              VOLTHA_BUILD=docker TAG=\$TAG TARGET_REPOSITORY=voltha/ TARGET_TAG=\$RELEASETAG make push
             else
               VOLTHA_BUILD=docker TAG=\$TAG TARGET_REPOSITORY=voltha/ TARGET_TAG=\$TAG make push
             fi
diff --git a/jjb/voltha-publish.yaml b/jjb/voltha-publish.yaml
index f76f14a..e58a5ef 100644
--- a/jjb/voltha-publish.yaml
+++ b/jjb/voltha-publish.yaml
@@ -53,11 +53,6 @@
           description: 'Name of the repo branch to use'
 
       - string:
-          name: releaseTag
-          default: ''
-          description: 'Tag for the containers on Docker Hub'
-
-      - string:
           name: failureEmail
           default: '{failure-email-address}, $GERRIT_PATCHSET_UPLOADER_EMAIL'
           description: 'On job failure, send an email to these addresses'