blob: 2e3382b2607bcd7418c36dbddcfa370cc6e93a8e [file] [log] [blame]
Yuta HIGUCHI4e751d02018-05-11 10:22:11 -07001#!/bin/bash -e
Yuta HIGUCHI18948042018-05-08 14:07:51 -07002
3# exit on errors
4set -eu -o pipefail
5
6# import GPG key
7gpg --import jenkins.key
8
9# set up release build credentials
10. onos-build-credentials
11
12# configure git settings
13git config user.email "jenkins@onlab.us"
14git config user.name "ONOS Jenkins User"
15
16# stage the maven settings
17mkdir -p ~/.m2
18mv settings.xml ~/.m2/settings.xml
19
20# stage and add the build SSH key
21chmod 600 id_rsa.pub
22ssh-add id_rsa.pub
23
24# get the sources
25git checkout $GERRIT_BRANCH
26
Yuta HIGUCHIa36c0672018-05-11 09:45:47 -070027# sanity check: does the tag already exist?
28if git rev-parse -q --verify "refs/tags/${YANGTOOLS_VERSION}"; then
29 echo "${YANGTOOLS_VERSION} tag already exists"
30 exit -1
31fi
32
Yuta HIGUCHI18948042018-05-08 14:07:51 -070033# run the release process
34tools/onos-yang-tools-build-release ${YANGTOOLS_VERSION} ${YANGTOOLS_NEXT_VERSION} ${GERRIT_BRANCH}