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}'
34 node: bifrost-verify-virtual
36 # Make sure no verify job is running on any of the slaves since that would
37 # produce build logs after we wipe the destination directory.
41 - '{project}-bifrost-verify-*'
54 # DO NOT change this unless you know what you are doing.
55 BIFROST_GS_URL="gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/"
57 # This should never happen... even 'recheck' uses the last jobs'
58 # gerrit information. Better exit with error so we can investigate
59 [[ ! -n $GERRIT_NAME ]] || [[ ! -n $GERRIT_CHANGE_NUMBER ]] && exit 1
61 echo "Removing build artifacts for $GERRIT_NAME/$GERRIT_CHANGE_NUMBER"
63 if ! [[ "$BIFROST_GS_URL" =~ "/cross-community-ci/openstack/bifrost/" ]]; then
64 echo "Oops! BIFROST_GS_URL=$BIFROST_GS_URL does not seem like a valid"
65 echo "bifrost location on the Google storage server. Please double-check"
66 echo "that it's set properly or fix this line if necessary."
67 echo "gsutil will not be executed until this is fixed!"
71 while [[ $try_to_rm -lt 6 ]]; do
72 gsutil -m rm -r $BIFROST_GS_URL && _exitcode=$? && break
74 echo "gsutil rm failed! Trying again... (attempt #$try_to_rm)"
76 # Give it some time...
82 - '{project}-gerrit-trigger-cleanup':
86 # yamllint disable rule:line-length
88 recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn
89 # yamllint enable rule:line-length
90 - email-jenkins-admins-on-failure
91 # -------------------------------
93 # -------------------------------
95 name: 'openstack-gerrit-trigger-cleanup'
98 server-name: 'review.openstack.org'
101 # We only run this when the change is merged or
102 # abandoned since we don't need the logs anymore
103 - change-merged-event
104 - change-abandoned-event
105 # This is an OPNFV maintenance job. We don't want to provide
110 - project-compare-type: 'PLAIN'
111 project-pattern: 'openstack/bifrost'
113 - branch-compare-type: 'ANT'
114 branch-pattern: '**/{branch}'
115 disable-strict-forbidden-file-verification: 'true'
116 forbidden-file-paths:
120 pattern: 'releasenotes/**'
121 readable-message: true
124 name: 'opnfv-gerrit-trigger-cleanup'
127 server-name: 'gerrit.opnfv.org'
129 # We only run this when the change is merged or
130 # abandoned since we don't need the logs anymore
131 - change-merged-event
132 - change-abandoned-event
133 # This is an OPNFV maintenance job. We don't want to provide
138 - project-compare-type: 'ANT'
139 project-pattern: 'releng-xci'
141 - branch-compare-type: 'ANT'
142 branch-pattern: '**/{branch}'
145 pattern: 'bifrost/**'
146 readable-message: true