Yuta HIGUCHI | 1894804 | 2018-05-08 14:07:51 -0700 | [diff] [blame^] | 1 | #!/bin/bash -ex |
| 2 | |
| 3 | # exit on errors |
| 4 | set -eu -o pipefail |
| 5 | |
| 6 | # import GPG key |
| 7 | gpg --import jenkins.key |
| 8 | |
| 9 | # set up release build credentials |
| 10 | . onos-build-credentials |
| 11 | |
| 12 | # configure git settings |
| 13 | git config user.email "jenkins@onlab.us" |
| 14 | git config user.name "ONOS Jenkins User" |
| 15 | |
| 16 | # stage the maven settings |
| 17 | mkdir -p ~/.m2 |
| 18 | mv settings.xml ~/.m2/settings.xml |
| 19 | |
| 20 | # stage and add the build SSH key |
| 21 | chmod 600 id_rsa.pub |
| 22 | ssh-add id_rsa.pub |
| 23 | |
| 24 | # get the sources |
| 25 | git checkout $GERRIT_BRANCH |
| 26 | |
| 27 | # run the release process |
| 28 | tools/onos-yang-tools-build-release ${YANGTOOLS_VERSION} ${YANGTOOLS_NEXT_VERSION} ${GERRIT_BRANCH} |