Fix for docker-publish job.

The first fix is needed because by default the sandbox
is not enabled in onos jenkins.

The second fix is needed because onos jenkins uses ssh for scm
and the credentials file is necessary

Change-Id: I61b6a464adaf061ac182abf794533a4cf8fe5e20
diff --git a/jjb/pipeline/docker-publish.groovy b/jjb/pipeline/docker-publish.groovy
index 316d429..9f059f0 100644
--- a/jjb/pipeline/docker-publish.groovy
+++ b/jjb/pipeline/docker-publish.groovy
@@ -25,7 +25,7 @@
       steps {
         checkout([
           $class: 'GitSCM',
-          userRemoteConfigs: [[ url: "${params.gitUrl}", ]],
+          userRemoteConfigs: [[ url: "${params.gitUrl}", credentialsId:'${params.credentialsId}']],
           branches: [[ name: "${params.gitRef}", ]],
           extensions: [
             [$class: 'WipeWorkspace'],
diff --git a/jjb/templates/docker-publish.yaml b/jjb/templates/docker-publish.yaml
index 906f9a4..489d6bd 100644
--- a/jjb/templates/docker-publish.yaml
+++ b/jjb/templates/docker-publish.yaml
@@ -73,6 +73,11 @@
           description: "The person that should be notified if this job fails"
 
       - string:
+          name: credentialsId
+          default: '{jenkins-ssh-credential}'
+          description: "The ssh credentials id file to be used during the checkout"
+
+      - string:
           name: extraEnvironmentVars
           default: '{extraEnvironmentVars}'
           description: "Provide extra environment variables to the build"
@@ -80,5 +85,6 @@
     project-type: pipeline
     concurrent: true
     extraEnvironmentVars: ""
+    sandbox: true
 
     dsl: !include-raw-escape: ../pipeline/docker-publish.groovy