Yuta HIGUCHI | 4e751d0 | 2018-05-11 10:22:11 -0700 | [diff] [blame] | 1 | #!/bin/bash -e |
Yuta HIGUCHI | 1894804 | 2018-05-08 14:07:51 -0700 | [diff] [blame] | 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 | |
Yuta HIGUCHI | a36c067 | 2018-05-11 09:45:47 -0700 | [diff] [blame] | 27 | # sanity check: does the tag already exist? |
| 28 | if git rev-parse -q --verify "refs/tags/${YANGTOOLS_VERSION}"; then |
| 29 | echo "${YANGTOOLS_VERSION} tag already exists" |
| 30 | exit -1 |
| 31 | fi |
| 32 | |
Yuta HIGUCHI | 1894804 | 2018-05-08 14:07:51 -0700 | [diff] [blame] | 33 | # run the release process |
| 34 | tools/onos-yang-tools-build-release ${YANGTOOLS_VERSION} ${YANGTOOLS_NEXT_VERSION} ${GERRIT_BRANCH} |