use the correct branch when proposing a new config file
when backported patches are merged the script was proposing changes to the master branch instead of the stable branch. refer to https://review.openstack.org/#/c/290180/1 to see how it proposed a really old change. Change-Id: I198297c7a1c0044b88709cfedf6628a26e4960bc
This commit is contained in:
parent
2659f12a20
commit
8c7badb93c
@ -44,7 +44,7 @@
|
||||
- link-logs
|
||||
- net-info
|
||||
- gerrit-git-prep
|
||||
- shell: /usr/local/jenkins/slave_scripts/propose_updated_config_file.sh openstack/keystone master
|
||||
- shell: /usr/local/jenkins/slave_scripts/propose_updated_config_file.sh openstack/keystone
|
||||
|
||||
publishers:
|
||||
- console-log
|
||||
|
@ -15,7 +15,6 @@
|
||||
source /usr/local/jenkins/slave_scripts/common.sh
|
||||
|
||||
PROJECT=$1
|
||||
BRANCH=$2
|
||||
INITIAL_COMMIT_MSG="Updating sample configuration file"
|
||||
USERNAME="proposal-bot"
|
||||
TOPIC="$PROJECT/genconf"
|
||||
@ -25,7 +24,9 @@ setup_git
|
||||
|
||||
# Function setup_commit_message will set CHANGE_ID if a change
|
||||
# exists and will always set COMMIT_MSG.
|
||||
setup_commit_message $PROJECT $USERNAME $BRANCH $TOPIC "$INITIAL_COMMIT_MSG"
|
||||
# Note, ZUUL_REFNAME always exists and is the branch name, for example, it
|
||||
# may be master or stable/liberty
|
||||
setup_commit_message $PROJECT $USERNAME $ZUUL_REFNAME $TOPIC "$INITIAL_COMMIT_MSG"
|
||||
|
||||
# Function check_already_approved will quit the proposal process if there
|
||||
# is already an approved job with the same CHANGE_ID
|
||||
@ -47,7 +48,7 @@ if ! git diff --stat --exit-code HEAD ; then
|
||||
git commit $git_args <<EOF
|
||||
$COMMIT_MSG
|
||||
EOF
|
||||
OUTPUT=$(git review -t $TOPIC $BRANCH)
|
||||
OUTPUT=$(git review -t $TOPIC $ZUUL_REFNAME)
|
||||
RET=$?
|
||||
[[ "$RET" -eq "0" || "$OUTPUT" =~ "no new changes" || "$OUTPUT" =~ "no changes made" ]]
|
||||
SUCCESS=$?
|
||||
|
Loading…
x
Reference in New Issue
Block a user