Apply given unique docker tag to image

 - add input parameter to docker job and pass it to the build script
   (which has the requirement to use it to use it to tag any images
   it creates and pushes to Nexus)
 - this commit has no practical effect on music docker build until
   https://gerrit.onap.org/r/c/music/distributed-kv-store/+/114637
   is merged

Issue-ID: INT-1760
Signed-off-by: Lasse Kaihlavirta <l.kaihlavirt@partner.samsung.com>
Change-Id: I7ed89081e7d399c46ec875659d4c022a85dbce54
diff --git a/jjb/global-templates-golang.yaml b/jjb/global-templates-golang.yaml
index 4d48b87..c85c74a 100644
--- a/jjb/global-templates-golang.yaml
+++ b/jjb/global-templates-golang.yaml
@@ -169,7 +169,8 @@
           branch: '{branch}'
           refspec: 'refs/heads/{branch}'
           artifacts: '{archive-artifacts}'
-
+      - integration-unique-docker-tag:
+          unique-docker-tag: ''
     scm:
       - gerrit-trigger-scm:
           refspec: ''
diff --git a/jjb/integration/integration-macros.yaml b/jjb/integration/integration-macros.yaml
index a6d3695..d485b8e 100644
--- a/jjb/integration/integration-macros.yaml
+++ b/jjb/integration/integration-macros.yaml
@@ -47,6 +47,14 @@
           default: '{terragrunt-version}'
           description: 'Terragrunt version to install on minion'
 
+- parameter:
+    name: integration-unique-docker-tag
+    parameters:
+     - string:
+          name: UNIQUE_DOCKER_TAG
+          default: '{unique-docker-tag}'
+          description: 'Unique docker tag to identify specific version'
+
 - builder:
     name: integration-install-robotframework
     builders:
diff --git a/jjb/music/build-music-distributed-kv-store-image.sh b/jjb/music/build-music-distributed-kv-store-image.sh
index d11f053..69a7785 100755
--- a/jjb/music/build-music-distributed-kv-store-image.sh
+++ b/jjb/music/build-music-distributed-kv-store-image.sh
@@ -1,9 +1,10 @@
 #!/bin/bash
 
 echo '============== CALLING SCRIPT TO BUILD DOCKER IMAGES ================='
+echo "============== Unique docker tag: ${UNIQUE_DOCKER_TAG}"
 CURRENTDIR="$(pwd)"
 echo $CURRENTDIR
 
 chmod 755 ./deployment/*.sh
 cd ./deployment
-./docker-build.sh
+./docker-build.sh ${UNIQUE_DOCKER_TAG}