Feat!: Update JJB version to 6x
[releng/builder.git] / jjb / integration / distribution / distribution-check-wipe.sh
1 #!/bin/bash -l
2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2024 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 # This script performs version bumping activities for an ODL release.
13 echo "---> distribution-check-wipe.sh"
14
15 echo "wipe r: the local Maven repository"
16 rm -rfv /tmp/r
17 echo "wipe n: the fake remote (Nexus) repository"
18 rm -rfv /tmp/n
19 echo "wipe t: the transient repository used in some manipulations"
20 rm -rfv /tmp/t
21 echo "create n: multithreaded execution might fail at creating it."
22 mkdir /tmp/n
23 echo "detecting distribution allowed projects"
24 # Some allowed projects cannot be detected in distribution because they do not produce features.
25 ALLOW_PROJECTS=(yangtools mdsal openflowjava)
26 if [[ "$KARAF_VERSION" == "odl" ]]; then
27 # shellcheck disable=SC2207
28 ALLOW_PROJECTS+=($(grep '<groupId>org.opendaylight.' -Rh distribution \
29 | sed -e 's%^[ \t]*<groupId>org.opendaylight.%%' \
30 | sed -e 's%</groupId>%%' | sort -u))
31 else
32 # For Managed distro we only look at the features folder
33 # shellcheck disable=SC2207
34 ALLOW_PROJECTS+=($(grep '<groupId>org.opendaylight.' -Rh distribution/features \
35 | sed -e 's%^[ \t]*<groupId>org.opendaylight.%%' \
36 | sed -e 's%</groupId>%%' | sort -u))
37 fi
38 echo "Allowed projects are " "${ALLOW_PROJECTS[@]}"
39 echo "ALLOW_PROJECTS= " "${ALLOW_PROJECTS[@]}" > allowed_projects.txt