blob: ecd6f251fe2c7410befc7af2a9a6cd77846f2eb9 [file] [log] [blame]
Andy Bavierc5178522018-12-12 15:36:30 -07001/* voltha-publish pipeline */
2pipeline {
3
4 /* no label, executor is determined by JJB */
5 agent {
6 label "${params.executorNode}"
7 }
8 stages {
9
10 stage('repo') {
11 steps {
12 checkout(changelog: false, \
13 poll: false,
14 scm: [$class: 'RepoScm', \
15 manifestRepositoryUrl: "${params.manifestUrl}", \
16 manifestBranch: "${params.manifestBranch}", \
Andy Bavierda0d6ba2018-12-13 13:06:37 -070017 manifestGroup: 'voltha', \
Andy Bavierc5178522018-12-12 15:36:30 -070018 currentBranch: true, \
19 destinationDir: 'cord', \
20 forceSync: true,
21 resetFirst: true, \
22 quiet: true, \
23 jobs: 4, \
24 showAllChanges: true] \
25 )
26 }
27 }
28
29 stage('build'){
30 steps {
31 sh """
32 #!/usr/bin/env bash
33
34 pushd cord/incubator/voltha
35 VOLTHA_BUILD=docker DOCKER_CACHE_ARG=--no-cache TAG=${params.manifestBranch} make build
36
37 popd
38 """
39 }
40 }
41
42 stage('push'){
43 steps {
44 withDockerRegistry([credentialsId: 'docker-artifact-push-credentials', url: '']) {
45 sh """
46 #!/usr/bin/env bash
47
48 pushd cord/incubator/voltha
49 VOLTHA_BUILD=docker TAG=${params.manifestBranch} TARGET_REPOSITORY=voltha/ TARGET_TAG=${params.manifestBranch} make push
50
51 popd
52 """
53 }
54 }
55 }
56 }
57
58 post {
59 failure {
60 emailext (
61 subject: "$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS",
62 body: "Check console output at $BUILD_URL to view the results.",
63 to: "${params.failureEmail}"
64 )
65 }
66 }
67}