3 name: 'openstack-bifrost-cleanup'
4 # -------------------------------
6 # -------------------------------
11 # -------------------------------
13 # -------------------------------
16 project-repo: 'https://git.openstack.org/openstack/bifrost'
17 clone-location: '/opt/bifrost'
19 project-repo: 'https://gerrit.opnfv.org/gerrit/releng-xci'
20 clone-location: '/opt/releng-xci'
22 # -------------------------------
24 # -------------------------------
26 - '{project}-bifrost-cleanup-{stream}'
29 name: '{project}-bifrost-cleanup-{stream}'
33 node: bifrost-verify-virtual
35 # Make sure no verify job is running on any of the slaves since that would
36 # produce build logs after we wipe the destination directory.
40 - '{project}-bifrost-verify-*'
53 # DO NOT change this unless you know what you are doing.
54 BIFROST_GS_URL="gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/"
56 # This should never happen... even 'recheck' uses the last jobs'
57 # gerrit information. Better exit with error so we can investigate
58 [[ ! -n $GERRIT_NAME ]] || [[ ! -n $GERRIT_CHANGE_NUMBER ]] && exit 1
60 echo "Removing build artifacts for $GERRIT_NAME/$GERRIT_CHANGE_NUMBER"
62 if ! [[ "$BIFROST_GS_URL" =~ "/cross-community-ci/openstack/bifrost/" ]]; then
63 echo "Oops! BIFROST_GS_URL=$BIFROST_GS_URL does not seem like a valid"
64 echo "bifrost location on the Google storage server. Please double-check"
65 echo "that it's set properly or fix this line if necessary."
66 echo "gsutil will not be executed until this is fixed!"
70 while [[ $try_to_rm -lt 6 ]]; do
71 gsutil -m rm -r $BIFROST_GS_URL && _exitcode=$? && break
73 echo "gsutil rm failed! Trying again... (attempt #$try_to_rm)"
75 # Give it some time...
81 - '{project}-gerrit-trigger-cleanup':
85 # yamllint disable rule:line-length
87 recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn
88 # yamllint enable rule:line-length
89 - email-jenkins-admins-on-failure
90 # -------------------------------
92 # -------------------------------
94 name: 'openstack-gerrit-trigger-cleanup'
97 server-name: 'review.openstack.org'
100 # We only run this when the change is merged or
101 # abandoned since we don't need the logs anymore
102 - change-merged-event
103 - change-abandoned-event
104 # This is an OPNFV maintenance job. We don't want to provide
109 - project-compare-type: 'PLAIN'
110 project-pattern: 'openstack/bifrost'
112 - branch-compare-type: 'ANT'
113 branch-pattern: '**/{branch}'
114 disable-strict-forbidden-file-verification: 'true'
115 forbidden-file-paths:
119 pattern: 'releasenotes/**'
120 readable-message: true
123 name: 'opnfv-gerrit-trigger-cleanup'
126 server-name: 'gerrit.opnfv.org'
128 # We only run this when the change is merged or
129 # abandoned since we don't need the logs anymore
130 - change-merged-event
131 - change-abandoned-event
132 # This is an OPNFV maintenance job. We don't want to provide
137 - project-compare-type: 'ANT'
138 project-pattern: 'releng-xci'
140 - branch-compare-type: 'ANT'
141 branch-pattern: '**/{branch}'
144 pattern: 'bifrost/**'
145 readable-message: true