tost: add onf registry credentials to pull bf-sde images

We are transitioning from dockerhub to the onf registry to store the
bf-sde images (private).

Change-Id: Iefb7d54d6d6cc07acf0636c69dad1781fb387b00
diff --git a/jjb/pipeline/tost-onos-publish.groovy b/jjb/pipeline/tost-onos-publish.groovy
index c0feef5..9d69049 100644
--- a/jjb/pipeline/tost-onos-publish.groovy
+++ b/jjb/pipeline/tost-onos-publish.groovy
@@ -47,31 +47,33 @@
         script {
           sshagent(credentials: ['github-onf-bot-ssh-key']) {
             withDockerRegistry([credentialsId: 'docker-artifact-push-credentials']) {
-              sh( script: """
-                #!/usr/bin/env bash
-                set -eu -o pipefail
+              withDockerRegistry([url: 'https://registry.opennetworking.org', credentialsId: 'onf-internal-registry']) {
+                sh( script: """
+                  #!/usr/bin/env bash
+                  set -eu -o pipefail
 
-                # checked out in a subdir so the log can be in WORKSPACE
-                cd "$GERRIT_PROJECT"
+                  # checked out in a subdir so the log can be in WORKSPACE
+                  cd "$GERRIT_PROJECT"
 
-                # set registry/repository variables
-                export DOCKER_REGISTRY="$dockerRegistry/"
-                export DOCKER_REPOSITORY="$dockerRepo/"
+                  # set registry/repository variables
+                  export DOCKER_REGISTRY="$dockerRegistry/"
+                  export DOCKER_REPOSITORY="$dockerRepo/"
 
-                # Builds having a build date
-                if [ ! -z "$buildDate" ]; then
-                  export DOCKER_TAG_BUILD_DATE="-$current_date"
-                fi
+                  # Builds having a build date
+                  if [ ! -z "$buildDate" ]; then
+                    export DOCKER_TAG_BUILD_DATE="-$current_date"
+                  fi
 
-                # Builds having the profiler enabled
-                if [ ! -z "$PROFILER" ]; then
-                  export DOCKER_TAG_PROFILER="-profiler"
-                fi
+                  # Builds having the profiler enabled
+                  if [ ! -z "$PROFILER" ]; then
+                    export DOCKER_TAG_PROFILER="-profiler"
+                  fi
 
-                # Build w/extraEnvironmentVars
-                echo "Building image with following vars $extraEnvironmentVars"
-                $extraEnvironmentVars make docker-build 2>&1 | tee "$WORKSPACE/docker-build.log"
-              """)
+                  # Build w/extraEnvironmentVars
+                  echo "Building image with following vars $extraEnvironmentVars"
+                  $extraEnvironmentVars make docker-build 2>&1 | tee "$WORKSPACE/docker-build.log"
+                """)
+              }
             }
           }
         }