Correct parameters and tag checkout only in case of release

Change-Id: If0bfb47a28f4e3b4f84bea33ec62403344e529af
diff --git a/jjb/onos/onos-docker-build.sh b/jjb/onos/onos-docker-build.sh
index be2248e..7faccca 100644
--- a/jjb/onos/onos-docker-build.sh
+++ b/jjb/onos/onos-docker-build.sh
@@ -15,7 +15,9 @@
 
 # get the sources
 git checkout $GERRIT_BRANCH
-git checkout -b docker $ONOS_TAG
+if [[ $ONOS_TAG != *"latest"* ]]; then
+  git checkout -b docker $ONOS_TAG
+fi
 
 # build and deploy the Docker image
 $DOCKER build -t onosproject/onos:${ONOS_TAG} .
diff --git a/jjb/onos/onos-verify.yaml b/jjb/onos/onos-verify.yaml
index 440ba62..e065c66 100644
--- a/jjb/onos/onos-verify.yaml
+++ b/jjb/onos/onos-verify.yaml
@@ -871,8 +871,8 @@
 
       jobs:
           - 'onos-{stream}-docker-merge-build':
-                - ONOS_TAG: 'latest'
-                - disabled: true
+                ONOS_TAG: 'latest'
+                disabled: true
 
 - project:
       name: onos-docker-merge-released-build
@@ -888,8 +888,8 @@
 
       jobs:
           - 'onos-{stream}-docker-merge-build':
-                - ONOS_TAG: '{stream}-latest'
-                - disabled: true
+                ONOS_TAG: '{stream}-latest'
+                disabled: true
 - project:
       name: onos-snapshot
       project-name: onos-snapshot