2 name: 'openstack-bifrost-cleanup'
3 #--------------------------------
5 #--------------------------------
10 #--------------------------------
12 #--------------------------------
15 project-repo: 'https://git.openstack.org/openstack/bifrost'
16 clone-location: '/opt/bifrost'
18 project-repo: 'https://gerrit.opnfv.org/gerrit/releng'
19 clone-location: '/opt/releng'
21 #--------------------------------
23 #--------------------------------
25 - '{project}-bifrost-cleanup-{stream}'
28 name: '{project}-bifrost-cleanup-{stream}'
32 node: bifrost-verify-virtual
34 # Make sure no verify job is running on any of the slaves since that would
35 # produce build logs after we wipe the destination directory.
39 - '{project}-bifrost-verify-*'
52 # DO NOT change this unless you know what you are doing.
53 BIFROST_GS_URL="gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/"
55 # This should never happen... even 'recheck' uses the last jobs'
56 # gerrit information. Better exit with error so we can investigate
57 [[ ! -n $GERRIT_NAME ]] || [[ ! -n $GERRIT_CHANGE_NUMBER ]] && exit 1
59 echo "Removing build artifacts for $GERRIT_NAME/$GERRIT_CHANGE_NUMBER"
61 if ! [[ "$BIFROST_GS_URL" =~ "/cross-community-ci/openstack/bifrost/" ]]; then
62 echo "Oops! BIFROST_GS_URL=$BIFROST_GS_URL does not seem like a valid"
63 echo "bifrost location on the Google storage server. Please double-check"
64 echo "that it's set properly or fix this line if necessary."
65 echo "gsutil will not be executed until this is fixed!"
69 while [[ $try_to_rm -lt 6 ]]; do
70 gsutil -m rm -r $BIFROST_GS_URL && _exitcode=$? && break
72 echo "gsutil rm failed! Trying again... (attempt #$try_to_rm)"
74 # Give it some time...
80 - '{project}-gerrit-trigger-cleanup':
85 recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn
86 #--------------------------------
88 #--------------------------------
90 name: 'openstack-gerrit-trigger-cleanup'
93 server-name: 'review.openstack.org'
96 # We only run this when the change is merged or
97 # abandoned since we don't need the logs anymore
99 - change-abandoned-event
100 # This is an OPNFV maintenance job. We don't want to provide
105 - project-compare-type: 'PLAIN'
106 project-pattern: 'openstack/bifrost'
108 - branch-compare-type: 'ANT'
109 branch-pattern: '**/{branch}'
110 disable-strict-forbidden-file-verification: 'true'
111 forbidden-file-paths:
115 pattern: 'releasenotes/**'
116 disable-strict-forbidden-file-verification: 'true'
117 readable-message: true
119 name: 'opnfv-gerrit-trigger-cleanup'
122 server-name: 'gerrit.opnfv.org'
124 # We only run this when the change is merged or
125 # abandoned since we don't need the logs anymore
126 - change-merged-event
127 - change-abandoned-event
128 # This is an OPNFV maintenance job. We don't want to provide
133 - project-compare-type: 'ANT'
134 project-pattern: 'releng'
136 - branch-compare-type: 'ANT'
137 branch-pattern: '**/{branch}'
140 pattern: 'prototypes/bifrost/**'
141 readable-message: true