Matteo Scandolo | e7425c5 | 2017-08-14 17:49:31 -0700 | [diff] [blame] | 1 | // 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 Williams | ce63eb0 | 2017-02-28 10:46:22 -0700 | [diff] [blame] | 14 | |
| 15 | stage('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 | |
| 27 | stage('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 | |
| 33 | stage('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){ |
| 39 | echo "Pushing image: " + image.push_name |
| 40 | docker.image(image.push_name).push() |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | echo "All done" |