3 # Install git-review using virtualenv to the latest version that supports
4 # --reviewers option, available through pip install. Existing minion image has a
5 # version that does not have it.
6 virtualenv "/tmp/v/git-review"
7 # shellcheck source=/tmp/v/git-review/bin/activate disable=SC1091
8 source "/tmp/v/git-review/bin/activate"
9 pip install --upgrade pip
10 pip install --upgrade git-review
13 # shellcheck disable=SC1083
14 CHANGE_ID=$(ssh -p 29418 "jenkins-$SILO@git.opendaylight.org" gerrit query \
15 limit:1 owner:self is:open project:{project} \
16 message:'{gerrit-commit-message}' \
17 topic:{gerrit-topic} | \
21 if [ -z "$CHANGE_ID" ]; then
22 git commit -sm "{gerrit-commit-message}"
24 git commit -sm "{gerrit-commit-message}" -m "Change-Id: $CHANGE_ID"
28 git remote add gerrit "ssh://jenkins-$SILO@git.opendaylight.org:29418/releng/builder.git"
30 # Don't fail the build if this command fails because it's possible that there
31 # is no changes since last update.
32 # shellcheck disable=SC1083
33 git review --yes -t {gerrit-topic} --reviewers jluhrsen@redhat.com || true