blob: 48b97fa813fa35469a32aa2d6a9798b06335da48 [file] [log] [blame]
Matteo Scandoloe7425c52017-08-14 17:49:31 -07001// Copyright 2017-present Open Networking Foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
Zack Williamsce63eb02017-02-28 10:46:22 -070014
15stage('checkout') {
16 node('master'){
17 checkout(changelog: false, poll: false, scm: [$class: 'RepoScm', \
18 manifestRepositoryUrl: 'https://gerrit.opencord.org/manifest.git', \
19 manifestBranch: 'master', currentBranch: true, \
20 manifestFile: 'default.xml', \
21 destinationDir: 'cord', \
22 forceSync: true, resetFirst: true, \
23 quiet: false, jobs: 4, showAllChanges: true])
24 }
25}
26
27stage('imagebuilder'){
28 node('master') {
29 sh '$WORKSPACE/imagebuilder.py -v -b -r cord/ -c cord/docker_images.yml -l image_logs -a ib_actions.yml -g ib_graph.dot'
30 }
31}
32
33stage('push'){
34 node('master'){
35 def ib_actions = readYaml( file:"$WORKSPACE/ib_actions.yml" )
36
37 withDockerRegistry([credentialsId: 'docker-artifact-push-credentials']) {
38 for(image in ib_actions.ib_built){
Zack Williams9b7c80b2018-03-20 15:07:58 -070039 for(tag in image.tags){
40 echo "Pushing image: " + tag
41 docker.image(tag).push()
42 }
Zack Williamsce63eb02017-02-28 10:46:22 -070043 }
44 }
45 }
46}
47
48echo "All done"