diff options
author | Amar Tumballi <amar@kadalu.io> | 2020-04-07 18:35:21 +0530 |
---|---|---|
committer | Amar Tumballi <amar@kadalu.io> | 2020-04-07 18:38:59 +0530 |
commit | 58b89df4e7f512c955118a6fc1085ebbda13550f (patch) | |
tree | c2a553676cd1061e9d6da7d6dce83e8b1699299d /build-gluster-org | |
parent | 58c4fedc966c6a8ebc9593471807cd7bcce32caa (diff) |
remove jobs which used (or managed) bugzilla
Change-Id: Iacb5542715fe912b570af3485475917211f056f5
Signed-off-by: Amar Tumballi <amar@kadalu.io>
Diffstat (limited to 'build-gluster-org')
-rw-r--r-- | build-gluster-org/jobs/abandon-review.yml | 36 | ||||
-rw-r--r-- | build-gluster-org/jobs/bugzilla-post.yml | 48 | ||||
-rw-r--r-- | build-gluster-org/jobs/restore-review.yml | 36 | ||||
-rw-r--r-- | build-gluster-org/scripts/bugzilla-post.sh | 73 |
4 files changed, 0 insertions, 193 deletions
diff --git a/build-gluster-org/jobs/abandon-review.yml b/build-gluster-org/jobs/abandon-review.yml deleted file mode 100644 index 016a9e6..0000000 --- a/build-gluster-org/jobs/abandon-review.yml +++ /dev/null @@ -1,36 +0,0 @@ -- job: - name: abandon-review - node: bugzilla - description: Update bugs when a review is abandoned - project-type: freestyle - - scm: - - glusterfs - - triggers: - - gerrit: - trigger-on: - - change-abandoned-event - server-name: review.gluster.org - projects: - - project-compare-type: 'PLAIN' - project-pattern: 'glusterfs' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**' - - parameters: - - string: - default: refs/heads/master - description: 'For review 12345 and patch set 6, this will be refs/changes/45/12345/6. Default: Tip of master' - name: GERRIT_REFSPEC - - string: - default: master - description: 'Name of the branch you want to build from. We usually build from master' - name: GERRIT_BRANCH - - builders: - - shell: /opt/qa/github/handle_bugzilla.py --abandon - - wrappers: - - timestamps diff --git a/build-gluster-org/jobs/bugzilla-post.yml b/build-gluster-org/jobs/bugzilla-post.yml deleted file mode 100644 index 1a9025e..0000000 --- a/build-gluster-org/jobs/bugzilla-post.yml +++ /dev/null @@ -1,48 +0,0 @@ -- job: - name: bugzilla-post - node: bugzilla - description: Reporting the status of bugs on Bugzilla - project-type: freestyle - - scm: - - glusterfs - - triggers: - - gerrit: - trigger-on: - - patchset-created-event: - exclude-drafts: false - exclude-trivial-rebase: false - exclude-no-code-change: false - - change-merged-event - server-name: review.gluster.org_for-smoke-jobs - override-votes: 1 - gerrit-build-failed-verified-value: 0 - gerrit-build-unstable-verified-value: 0 - gerrit-build-notbuilt-verified-value: 0 - projects: - - project-compare-type: 'PLAIN' - project-pattern: 'glusterfs' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**' - - parameters: - - string: - default: refs/heads/master - description: 'For review 12345 and patch set 6, this will be refs/changes/45/12345/6. Default: Tip of master' - name: GERRIT_REFSPEC - - string: - default: master - description: 'Name of the branch you want to build from. We usually build from master' - name: GERRIT_BRANCH - - builders: - - shell: /opt/qa/github/handle_bugzilla.py - - wrappers: - - timestamps - - timeout: - timeout: 30 - abort: true - type: absolute diff --git a/build-gluster-org/jobs/restore-review.yml b/build-gluster-org/jobs/restore-review.yml deleted file mode 100644 index 0a5495f..0000000 --- a/build-gluster-org/jobs/restore-review.yml +++ /dev/null @@ -1,36 +0,0 @@ -- job: - name: restore-review - node: bugzilla - description: Update bugs when a review is restored - project-type: freestyle - - scm: - - glusterfs - - triggers: - - gerrit: - trigger-on: - - change-restored-event - server-name: review.gluster.org - projects: - - project-compare-type: 'PLAIN' - project-pattern: 'glusterfs' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**' - - parameters: - - string: - default: refs/heads/master - description: 'For review 12345 and patch set 6, this will be refs/changes/45/12345/6. Default: Tip of master' - name: GERRIT_REFSPEC - - string: - default: master - description: 'Name of the branch you want to build from. We usually build from master' - name: GERRIT_BRANCH - - builders: - - shell: /opt/qa/github/handle_bugzilla.py --restore - - wrappers: - - timestamps diff --git a/build-gluster-org/scripts/bugzilla-post.sh b/build-gluster-org/scripts/bugzilla-post.sh deleted file mode 100644 index e03150e..0000000 --- a/build-gluster-org/scripts/bugzilla-post.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -set -x -function commit_message_edited() -{ - if [ "$GERRIT_PATCHSET_NUMBER" != "1" ]; then - OLD_PATCHSET_NUM="$(($GERRIT_PATCHSET_NUMBER-1))" - commit_msg=$(curl -X GET https://review.gluster.org/changes/${GERRIT_PROJECT}~${GERRIT_BRANCH}~${GERRIT_CHANGE_ID}/revisions/$OLD_PATCHSET_NUM/commit | grep message | sed 's/\\n/\'$'\n''/g') - - old_bugid=$(echo $commit_msg | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+bz#[[:digit:]]+" | awk -F '#' '{print $2}'); - if [ -z "$old_bugid" ] ; then - # This is needed for backward compatibility - old_bugid=$(echo $commit_msg | grep -i '^bug: ' | awk '{print $2}') - fi - - if [ "$bugid" == "$old_bugid" ]; then - exit 0 - fi - fi -} - -function update_bugzilla() -{ - fixes=1 - bugid=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+bz#[[:digit:]]+" | awk -F '#' '{print $2}'); - update_string=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+bz#[[:digit:]]+" | awk -F ' ' '{print $1}'); - if [ ${update_string} == "updates:" ]; then - fixes=0 - fi - - if [[ -z "$bugid" ]] ; then - # Needed for backward compatibility - bugid=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d | grep -i '^bug: ' | awk '{print $2}'); - fi - - if [[ -z "$bugid" ]] ; then - # This is commit only has a github issue - return; - fi - - product=$(bugzilla query -b $bugid --outputformat='%{product}'); - if [ "$product" != "GlusterFS" ]; then - echo "Wrong product: $product" >&2; - return 1; - fi - - #checking the type of event - if [ "$GERRIT_EVENT_TYPE" != "change-merged" ]; then - if [ "$GERRIT_PATCHSET_NUMBER" == "1" ]; then - 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" --status POST; - else - commit_message_edited; - 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" --status POST; - fi - else - MERGER=$(echo "$GERRIT_PATCHSET_UPLOADER" | sed 's/\\//g') - if [ ${fixes} == 1 ]; then - bugzilla modify $bugid --comment="COMMIT: $GERRIT_CHANGE_URL committed in $GERRIT_BRANCH by $MERGER with a commit message-$(echo; echo;) $(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d)" --status MODIFIED; - else - bugzilla modify $bugid --comment="COMMIT: $GERRIT_CHANGE_URL committed in $GERRIT_BRANCH by $MERGER with a commit message-$(echo; echo;) $(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d)"; - fi - fi -} - -function main() -{ - if [ "$GERRIT_PROJECT" != "glusterfs" ]; then - return; - fi - update_bugzilla; -} - -main; |