Publish sdfabric-onos to DockerHub
Change-Id: Ia1e6b336ec0ae5b8c127734cef6d76679825918a
diff --git a/jjb/pipeline/tost-onos-publish.groovy b/jjb/pipeline/tost-onos-publish.groovy
index 9d69049..8891fce 100644
--- a/jjb/pipeline/tost-onos-publish.groovy
+++ b/jjb/pipeline/tost-onos-publish.groovy
@@ -47,33 +47,31 @@
script {
sshagent(credentials: ['github-onf-bot-ssh-key']) {
withDockerRegistry([credentialsId: 'docker-artifact-push-credentials']) {
- withDockerRegistry([url: 'https://registry.opennetworking.org', credentialsId: 'onf-internal-registry']) {
- sh( script: """
- #!/usr/bin/env bash
- set -eu -o pipefail
+ 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"
+ """)
}
}
}
@@ -83,7 +81,7 @@
stage('push'){
steps {
script {
- withDockerRegistry(credentialsId: 'aether-internal-registry', url: "https://${params.dockerRegistry}") {
+ withDockerRegistry([credentialsId: 'docker-artifact-push-credentials']) {
sh( script:"""
#!/usr/bin/env bash
set -eu -o pipefail
@@ -93,7 +91,7 @@
# set registry/repository variables
export DOCKER_REGISTRY="$dockerRegistry/"
- export DOCKER_REPOSITORY="$dockerRepo/"
+ export DOCKER_REPOSITORY="$dockerRepo"
# Builds having a build date
if [ ! -z "$buildDate" ]; then
diff --git a/jjb/repos/tost-onos.yaml b/jjb/repos/tost-onos.yaml
index fbd2777..4315ed7 100644
--- a/jjb/repos/tost-onos.yaml
+++ b/jjb/repos/tost-onos.yaml
@@ -61,8 +61,7 @@
# Job based on the SemVer DOCKER_TAG
- 'private-docker-publish':
disable-job: true
- docker-repo: 'tost'
- docker-registry: 'registry.aetherproject.org'
+ docker-repo: 'sdfabric-onos'
maintainers: 'charles@opennetworking.org, pier@opennetworking.org'
build-timeout: 30
dependency-jobs: 'version-tag_tost-onos'
@@ -72,8 +71,7 @@
target: 'master'
name-extension: '-{target}'
extraEnvironmentVars: 'DOCKER_TAG={target}'
- docker-repo: 'tost'
- docker-registry: 'registry.aetherproject.org'
+ docker-repo: 'sdfabric-onos'
maintainers: 'charles@opennetworking.org, pier@opennetworking.org'
build-timeout: 30
buildDate: ''
@@ -83,8 +81,7 @@
target: 'master'
name-extension: '-{target}'
extraEnvironmentVars: 'DOCKER_TAG={target}'
- docker-repo: 'tost'
- docker-registry: 'registry.aetherproject.org'
+ docker-repo: 'sdfabric-onos'
maintainers: 'charles@opennetworking.org, pier@opennetworking.org'
build-timeout: 30
timed: 'H 0 * * 5'
@@ -94,8 +91,7 @@
target: 'stable'
name-extension: '-{target}'
extraEnvironmentVars: 'DOCKER_TAG={target}'
- docker-repo: 'tost'
- docker-registry: 'registry.aetherproject.org'
+ docker-repo: 'sdfabric-onos'
maintainers: 'charles@opennetworking.org, pier@opennetworking.org'
build-timeout: 30
timed: ''