jjb: infra: bifrost-cleanup-job: Fix job triggers 39/29239/1
authorMarkos Chandras <mchandras@suse.de>
Wed, 22 Feb 2017 15:48:40 +0000 (15:48 +0000)
committerMarkos Chandras <mchandras@suse.de>
Wed, 22 Feb 2017 15:52:00 +0000 (15:52 +0000)
Add new trigger when a patchset is abandoned and drop the one for
'recheck' and 'reverify' comments since the logs will be eventually
deleted when the patchset is merged or abandoned. Moreover, fix quoting
for the BIFROST_GS_URL variable which prevented logs from being deleted
properly. This fixes the following error:

CommandException: No URLs matched:
gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/

Change-Id: I8f6ca7a9b2af4a7a4b204f15abf6a223144637a6

jjb/infra/bifrost-cleanup-job.yml

index 2f7d973..ba283ff 100644 (file)
@@ -50,7 +50,7 @@
             set -eu
 
             # DO NOT change this unless you know what you are doing.
-            BIFROST_GS_URL='gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/'
+            BIFROST_GS_URL="gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/"
 
             # This should never happen... even 'recheck' uses the last jobs'
             # gerrit information. Better exit with error so we can investigate
                 # We only run this when the change is merged since
                 # we don't need the logs anymore
                 - change-merged-event: 'true'
+                - change-abandoned-event: 'true'
                 - change-restored-event: 'false'
                 - draft-published-event: 'false'
-                # We need this in order to be able to trigger a cleanup
-                # from Gerrit should it be necessary
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
             # This is an OPNFV maintenance job. We don't want to provide
             # feedback on Gerrit
             silent: true
                 # We only run this when the change is merged since
                 # we don't need the logs anymore
                 - change-merged-event: 'true'
+                - change-abandoned-event: 'true'
                 - change-restored-event: 'false'
                 - draft-published-event: 'false'
-                # We need this in order to be able to trigger a cleanup
-                # from Gerrit should it be necessary
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
             # This is an OPNFV maintenance job. We don't want to provide
             # feedback on Gerrit
             silent: true