SEBA-556 Use Jenkins to publish VOLTHA :latest images to Docker Hub

Change-Id: I21973ab073999ee646a4153870ad547f73a4fb95
diff --git a/jjb/pipeline/voltha-publish.groovy b/jjb/pipeline/voltha-publish.groovy
index ecd6f25..a07d4f2 100644
--- a/jjb/pipeline/voltha-publish.groovy
+++ b/jjb/pipeline/voltha-publish.groovy
@@ -32,8 +32,12 @@
            #!/usr/bin/env bash
 
            pushd cord/incubator/voltha
-           VOLTHA_BUILD=docker DOCKER_CACHE_ARG=--no-cache TAG=${params.manifestBranch} make build
-
+           if [ "${params.manifestBranch}" != "master" ]
+           then
+             VOLTHA_BUILD=docker DOCKER_CACHE_ARG=--no-cache TAG=${params.manifestBranch} make build
+           else
+             VOLTHA_BUILD=docker DOCKER_CACHE_ARG=--no-cache make build
+           fi
            popd
            """
       }
@@ -46,8 +50,12 @@
             #!/usr/bin/env bash
 
             pushd cord/incubator/voltha
-            VOLTHA_BUILD=docker TAG=${params.manifestBranch} TARGET_REPOSITORY=voltha/ TARGET_TAG=${params.manifestBranch} make push
-
+            if [ "${params.manifestBranch}" != "master" ]
+            then
+              VOLTHA_BUILD=docker TAG=${params.manifestBranch} TARGET_REPOSITORY=voltha/ TARGET_TAG=${params.manifestBranch} make push
+            else
+              VOLTHA_BUILD=docker TARGET_REPOSITORY=voltha/ make push
+            fi
             popd
             """
         }
diff --git a/jjb/voltha-publish.yaml b/jjb/voltha-publish.yaml
index 8ec5c41..0e03be5 100644
--- a/jjb/voltha-publish.yaml
+++ b/jjb/voltha-publish.yaml
@@ -8,7 +8,7 @@
     jobs:
       - 'voltha-publish':
           project-regexp: 'voltha'
-          branch-regexp: 'voltha-1.6'
+          branch-regexp: '^(master|voltha-1.6)$'
           executor-node: 'imagebuilder'
           dependency-jobs: ''