diff options
author | Nigel Babu <nigelb@redhat.com> | 2017-10-30 12:16:25 +0100 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2017-10-30 15:46:35 +0100 |
commit | 56260df17ee6973b3ba5b8b71cbeb858f41bc784 (patch) | |
tree | 30870a49f2016715596cb4beeda8d35ad77b64b5 /build-gluster-org | |
parent | 39848657812b12c6c897faa4fa18db3d68ca11c9 (diff) |
Get bugzilla-post working in production
The tricky bit was that the run() command would cause some of the
failures. Given that we're unlikely to need it in the near future, I've
removed it. I've left the debugging on for the next couple of days in
case we need to debug any failures.
Change-Id: Ib3d34213495d76d517947c1ea7d421759ab6d53e
Diffstat (limited to 'build-gluster-org')
-rw-r--r-- | build-gluster-org/jobs/bugzilla-post.yml | 4 | ||||
-rw-r--r-- | build-gluster-org/scripts/bugzilla-post.sh | 20 |
2 files changed, 5 insertions, 19 deletions
diff --git a/build-gluster-org/jobs/bugzilla-post.yml b/build-gluster-org/jobs/bugzilla-post.yml index b337f8f..e64cd9f 100644 --- a/build-gluster-org/jobs/bugzilla-post.yml +++ b/build-gluster-org/jobs/bugzilla-post.yml @@ -36,10 +36,6 @@ default: master description: 'Name of the branch you want to build from. We usually build from master' name: GERRIT_BRANCH - - string: - default: 'true' - description: 'A parameter named DRY_RUN, defaults to true' - name: DRY_RUN builders: - shell: !include-raw: ../scripts/bugzilla-post.sh diff --git a/build-gluster-org/scripts/bugzilla-post.sh b/build-gluster-org/scripts/bugzilla-post.sh index 27a10a9..2ce3faf 100644 --- a/build-gluster-org/scripts/bugzilla-post.sh +++ b/build-gluster-org/scripts/bugzilla-post.sh @@ -1,5 +1,5 @@ #!/bin/bash - +set -x function commit_message_edited() { if [ "$GERRIT_PATCHSET_NUMBER" != "1" ]; then @@ -25,23 +25,14 @@ function update_bugzilla() #checking the type of event if [ "$GERRIT_EVENT_TYPE" != "change-merged" ]; then if [ "$GERRIT_PATCHSET_NUMBER" == "1" ]; then - run bugzilla modify $bugid --comment="REVIEW: $GERRIT_CHANGE_URL ($GERRIT_CHANGE_SUBJECT) posted (#$GERRIT_PATCHSET_NUMBER) for review on $GERRIT_BRANCH by $GERRIT_PATCHSET_UPLOADER_NAME"; + bugzilla modify $bugid --comment="REVIEW: $GERRIT_CHANGE_URL ($GERRIT_CHANGE_SUBJECT) posted (#$GERRIT_PATCHSET_NUMBER) for review on $GERRIT_BRANCH by $GERRIT_PATCHSET_UPLOADER_NAME"; else commit_message_edited; - run bugzilla modify $old_bugid --comment="REVISION POSTED: $GERRIT_CHANGE_URL ($GERRIT_CHANGE_SUBJECT) posted (#$GERRIT_PATCHSET_NUMBER) for review on $GERRIT_BRANCH by $GERRIT_PATCHSET_UPLOADER_NAME"; - run bugzilla modify $bugid --comment="REVIEW: $GERRIT_CHANGE_URL ($GERRIT_CHANGE_SUBJECT) posted (#$GERRIT_PATCHSET_NUMBER) for review on $GERRIT_BRANCH by $GERRIT_PATCHSET_UPLOADER_NAME"; + bugzilla modify $old_bugid --comment="REVISION POSTED: $GERRIT_CHANGE_URL ($GERRIT_CHANGE_SUBJECT) posted (#$GERRIT_PATCHSET_NUMBER) for review on $GERRIT_BRANCH by $GERRIT_PATCHSET_UPLOADER_NAME"; + bugzilla modify $bugid --comment="REVIEW: $GERRIT_CHANGE_URL ($GERRIT_CHANGE_SUBJECT) posted (#$GERRIT_PATCHSET_NUMBER) for review on $GERRIT_BRANCH by $GERRIT_PATCHSET_UPLOADER_NAME"; fi else - run bugzilla modify $bugid --comment="COMMIT: $GERRIT_CHANGE_URL committed in $GERRIT_BRANCH by $GERRIT_SUBMITTER $(echo; echo -------------; echo;) $(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d)"; - fi -} - -function run() -{ - if [[ "$DRY_RUN" ]]; then - echo $@ - else - $@ + bugzilla modify $bugid --comment="COMMIT: $GERRIT_CHANGE_URL committed in $GERRIT_BRANCH by $GERRIT_SUBMITTER $(echo; echo; echo -------------; echo;echo;echo;) $(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d)"; fi } @@ -54,4 +45,3 @@ function main() } main; - |