VOLTHA image publisher job
Change-Id: I175c058300d6ea03c56d86cd5d325214904bd936
diff --git a/jjb/pipeline/voltha-publish.groovy b/jjb/pipeline/voltha-publish.groovy
new file mode 100644
index 0000000..d56eca7
--- /dev/null
+++ b/jjb/pipeline/voltha-publish.groovy
@@ -0,0 +1,66 @@
+/* voltha-publish pipeline */
+pipeline {
+
+ /* no label, executor is determined by JJB */
+ agent {
+ label "${params.executorNode}"
+ }
+ stages {
+
+ stage('repo') {
+ steps {
+ checkout(changelog: false, \
+ poll: false,
+ scm: [$class: 'RepoScm', \
+ manifestRepositoryUrl: "${params.manifestUrl}", \
+ manifestBranch: "${params.manifestBranch}", \
+ currentBranch: true, \
+ destinationDir: 'cord', \
+ forceSync: true,
+ resetFirst: true, \
+ quiet: true, \
+ jobs: 4, \
+ showAllChanges: true] \
+ )
+ }
+ }
+
+ stage('build'){
+ steps {
+ sh """
+ #!/usr/bin/env bash
+
+ pushd cord/incubator/voltha
+ VOLTHA_BUILD=docker DOCKER_CACHE_ARG=--no-cache TAG=${params.manifestBranch} make build
+
+ popd
+ """
+ }
+ }
+
+ stage('push'){
+ steps {
+ withDockerRegistry([credentialsId: 'docker-artifact-push-credentials', url: '']) {
+ sh """
+ #!/usr/bin/env bash
+
+ pushd cord/incubator/voltha
+ VOLTHA_BUILD=docker TAG=${params.manifestBranch} TARGET_REPOSITORY=voltha/ TARGET_TAG=${params.manifestBranch} make push
+
+ popd
+ """
+ }
+ }
+ }
+ }
+
+ post {
+ failure {
+ emailext (
+ subject: "$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS",
+ body: "Check console output at $BUILD_URL to view the results.",
+ to: "${params.failureEmail}"
+ )
+ }
+ }
+}