From 982a7eb030bfe91ba4cb8fa5c976b5f4cad7f621 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 22 Feb 2017 15:48:40 +0000 Subject: jjb: infra: bifrost-cleanup-job: Fix job triggers 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 | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/jjb/infra/bifrost-cleanup-job.yml b/jjb/infra/bifrost-cleanup-job.yml index 2f7d9737b..ba283ffae 100644 --- a/jjb/infra/bifrost-cleanup-job.yml +++ b/jjb/infra/bifrost-cleanup-job.yml @@ -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 @@ -94,12 +94,9 @@ # 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 @@ -130,14 +127,9 @@ # 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 -- cgit 1.2.3-korg