Fix tost-onos jobs
- Re-add internal registry credentials to pull bf-sde image
- Specify opennetworking/ as the organization for the docker repo
Change-Id: I5c47bbd0eb17e88c447c95c7dc567597f5c69439
diff --git a/jjb/pipeline/tost-onos-publish.groovy b/jjb/pipeline/tost-onos-publish.groovy
index 8891fce..7ffee6a 100644
--- a/jjb/pipeline/tost-onos-publish.groovy
+++ b/jjb/pipeline/tost-onos-publish.groovy
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+def dockerRegistry = params.dockerRegistry ? "${params.dockerRegistry}/" : ""
+
/* tost-onos-publish pipeline.*/
pipeline {
@@ -47,31 +49,34 @@
script {
sshagent(credentials: ['github-onf-bot-ssh-key']) {
withDockerRegistry([credentialsId: 'docker-artifact-push-credentials']) {
- sh( script: """
- #!/usr/bin/env bash
- set -eu -o pipefail
+ // Required to pull the bf-sde image.
+ 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"
+ """)
+ }
}
}
}
@@ -90,7 +95,7 @@
cd "$GERRIT_PROJECT"
# set registry/repository variables
- export DOCKER_REGISTRY="$dockerRegistry/"
+ export DOCKER_REGISTRY="$dockerRegistry"
export DOCKER_REPOSITORY="$dockerRepo"
# Builds having a build date
diff --git a/jjb/repos/tost-onos.yaml b/jjb/repos/tost-onos.yaml
index 4315ed7..79ea07f 100644
--- a/jjb/repos/tost-onos.yaml
+++ b/jjb/repos/tost-onos.yaml
@@ -61,7 +61,7 @@
# Job based on the SemVer DOCKER_TAG
- 'private-docker-publish':
disable-job: true
- docker-repo: 'sdfabric-onos'
+ docker-repo: 'opennetworking/sdfabric-onos'
maintainers: 'charles@opennetworking.org, pier@opennetworking.org'
build-timeout: 30
dependency-jobs: 'version-tag_tost-onos'
@@ -71,7 +71,7 @@
target: 'master'
name-extension: '-{target}'
extraEnvironmentVars: 'DOCKER_TAG={target}'
- docker-repo: 'sdfabric-onos'
+ docker-repo: 'opennetworking/sdfabric-onos'
maintainers: 'charles@opennetworking.org, pier@opennetworking.org'
build-timeout: 30
buildDate: ''
@@ -81,7 +81,7 @@
target: 'master'
name-extension: '-{target}'
extraEnvironmentVars: 'DOCKER_TAG={target}'
- docker-repo: 'sdfabric-onos'
+ docker-repo: 'opennetworking/sdfabric-onos'
maintainers: 'charles@opennetworking.org, pier@opennetworking.org'
build-timeout: 30
timed: 'H 0 * * 5'
@@ -91,7 +91,7 @@
target: 'stable'
name-extension: '-{target}'
extraEnvironmentVars: 'DOCKER_TAG={target}'
- docker-repo: 'sdfabric-onos'
+ docker-repo: 'opennetworking/sdfabric-onos'
maintainers: 'charles@opennetworking.org, pier@opennetworking.org'
build-timeout: 30
timed: ''
diff --git a/jjb/templates/fabric-tna-jobs.yaml b/jjb/templates/fabric-tna-jobs.yaml
index 879bfec..b6431f4 100644
--- a/jjb/templates/fabric-tna-jobs.yaml
+++ b/jjb/templates/fabric-tna-jobs.yaml
@@ -9,7 +9,7 @@
Created by {id} job-template from ci-management/jjb/templates/fabric-tna-jobs.yaml<br/>
properties:
- # Visibility restricted to because logs contain output from
+ # Visibility restricted because logs contain output from
# Barefoot toolchain (under NDA).
- onf-infra-pronto-private:
- onf-infra-properties: