[AETHER-484] Updates CI/CD jobs to integrate fabric-tna
Change-Id: If53148c59114e824bce4b90cffe1d2639979deed
diff --git a/jjb/pipeline/docker-publish.groovy b/jjb/pipeline/docker-publish.groovy
index 0ee38f1..9ec89e3 100644
--- a/jjb/pipeline/docker-publish.groovy
+++ b/jjb/pipeline/docker-publish.groovy
@@ -43,38 +43,40 @@
stage('build'){
steps {
script {
- withCredentials([string(credentialsId: '64fe2b1a-b33a-4f13-8442-ad8360434003', variable: 'OMECPROJECT_API')]) {
- withDockerRegistry([credentialsId: 'docker-artifact-push-credentials']) {
- sh( script: """
- #!/usr/bin/env bash
- set -eu -o pipefail
+ withCredentials([string(credentialsId: 'onos-builder', variable: 'ONOS_BUILDER_API')]) {
+ withCredentials([string(credentialsId: '64fe2b1a-b33a-4f13-8442-ad8360434003', variable: 'OMECPROJECT_API')]) {
+ withDockerRegistry([credentialsId: 'docker-artifact-push-credentials']) {
+ sh( script: """
+ #!/usr/bin/env bash
+ set -eu -o pipefail
- # checked out in a subdir so the log can be in WORKSPACE
- cd "$projectName"
+ # checked out in a subdir so the log can be in WORKSPACE
+ cd "$projectName"
- # set registry/repository variables
- export DOCKER_REGISTRY="$dockerRegistry/"
- export DOCKER_REPOSITORY="$dockerRepo/"
+ # set registry/repository variables
+ export DOCKER_REGISTRY="$dockerRegistry/"
+ export DOCKER_REPOSITORY="$dockerRepo/"
- # Build w/branch
- echo "Building image with branch"
- $extraEnvironmentVars DOCKER_TAG="$branchName" make docker-build 2>&1 | tee "$WORKSPACE/docker-build.log"
+ # Build w/branch
+ echo "Building image with branch"
+ $extraEnvironmentVars DOCKER_TAG="$branchName" make docker-build 2>&1 | tee "$WORKSPACE/docker-build.log"
- # Build w/tags if they exist
- if [ -n "$git_tags" ]
- echo "Tags found in git, building:"
- echo "$git_tags"
+ # Build w/tags if they exist
+ if [ -n "$git_tags" ]
+ echo "Tags found in git, building:"
+ echo "$git_tags"
- then
- for tag in $git_tags
- do
- # remove leading 'v' on funky golang tags
- clean_tag=\$(echo \$tag | sed 's/^v//g')
- echo "Building image with tag: \$clean_tag (should reuse cached layers)"
- $extraEnvironmentVars DOCKER_TAG="\$clean_tag" make docker-build
- done
- fi
- """)
+ then
+ for tag in $git_tags
+ do
+ # remove leading 'v' on funky golang tags
+ clean_tag=\$(echo \$tag | sed 's/^v//g')
+ echo "Building image with tag: \$clean_tag (should reuse cached layers)"
+ $extraEnvironmentVars DOCKER_TAG="\$clean_tag" make docker-build
+ done
+ fi
+ """)
+ }
}
}
}