825023d31958a73633162c5bec2e812f3697ccc6
[releng/builder.git] / jjb / integration / distribution / distribution-delete-snaphot-artifacts.sh
1 #!/bin/bash -x
2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11
12 set +e  # To avoid failures in projects which generate zero snapshot artifacts.
13 find "/tmp/r/org/opendaylight/$GERRIT_PROJECT/" -path "*-SNAPSHOT*" -delete
14 find /tmp/r/ -regex '.*/_remote.repositories\|.*/maven-metadata-local\.xml\|.*/maven-metadata-fake-nexus\.xml\|.*/resolver-status\.properties' -delete
15 find /tmp/r/ -type d -empty -delete
16 echo "INFO: A listing of project related files left in local repository follows."
17 find "/tmp/r/org/opendaylight/$GERRIT_PROJECT/"
18 true  # To prevent the possibly non-zero return code from failing the job.