Delete previous folder, ignore error if not exists
Instead of checking whether the folder exists we just try to delete it
recursively while ignoring the errors instead, as we do only care to
delete it if it exists in order to remove previously created artifacts.
@@ -72,9 +72,7 @@ function update_github_release() {
function upload_testing_manifests() {
# replaces periodic-kubevirt-update-release-x.y-testing-manifests periodics
- if [ "$(gsutil ls 'gs://kubevirt-prow/devel/release/kubevirt/kubevirt/'|grep $DOCKER_TAG|wc -l)" -gt 0 ]; then
- gsutil -m rm -r "gs://kubevirt-prow/devel/release/kubevirt/kubevirt/$DOCKER_TAG"
- fi
+ gsutil -m rm -r "gs://kubevirt-prow/devel/release/kubevirt/kubevirt/$DOCKER_TAG" || true
gsutil cp -r "_out/manifests/testing" "gs://kubevirt-prow/devel/release/kubevirt/kubevirt/$DOCKER_TAG/manifests/"
}
