Fix tag  subs. input variables

Change-Id: I1733c775816057ecb16acbf573c0165c19445d0d
diff --git a/docker-mirror-images.groovy b/docker-mirror-images.groovy
index ebbfc86..07a80e7 100644
--- a/docker-mirror-images.groovy
+++ b/docker-mirror-images.groovy
@@ -42,7 +42,7 @@
                     imagePath = imageArray[0]
                     if (imagePath.contains('SUBS_SOURCE_IMAGE_TAG')) {
                         common.warningMsg("Replacing SUBS_SOURCE_IMAGE_TAG => ${SOURCE_IMAGE_TAG}")
-                        imagePath.replace('SUBS_SOURCE_IMAGE_TAG', SOURCE_IMAGE_TAG)
+                        imagePath = imagePath.replace('SUBS_SOURCE_IMAGE_TAG', SOURCE_IMAGE_TAG)
                     }
                     targetRegistry = imageArray[1]
                     imageName = getImageName(imagePath)
diff --git a/tag-git-repos.groovy b/tag-git-repos.groovy
index dabbb7f..312ec9e 100644
--- a/tag-git-repos.groovy
+++ b/tag-git-repos.groovy
@@ -44,7 +44,7 @@
         repoCommit = repoArray[2]
         if (repoCommit.contains('SUBS_SOURCE_REF')) {
           common.warningMsg("Replacing SUBS_SOURCE_REF => ${SOURCE_TAG}")
-          repoCommit.replace('SUBS_SOURCE_REF', SOURCE_TAG
+          repoCommit = repoCommit.replace('SUBS_SOURCE_REF', SOURCE_TAG
             )
         }
         gitRepoAddTag(repoUrl, repoName, TAG, GIT_CREDENTIALS, repoCommit)