From 3c4e127040345c749b3078b205bbc96fe7019bae Mon Sep 17 00:00:00 2001 From: Ndacyayisenga-droid Date: Tue, 29 Aug 2023 10:04:06 +0300 Subject: [PATCH 1/2] Create Process/Tool to Validate Upload Of Release Artifacts To Artifactory --- linux/scripts/artifacts.sh | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 linux/scripts/artifacts.sh diff --git a/linux/scripts/artifacts.sh b/linux/scripts/artifacts.sh new file mode 100755 index 000000000..ee00a7ac5 --- /dev/null +++ b/linux/scripts/artifacts.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +TYPE=("jdk" "jre" "src") +VERS=("$@") # Accept the VERS array as arguments +DIST=("apk" "deb" "rpm") +DEBDISTS=("bookworm" "bullseye" "buster" "kinetic" "jammy" "focal" "bionic") +RPMDISTS=("centos/7" "rocky/8" "rhel/7" "opensuse/15.3") + +if [ $# -eq 0 ]; then + echo "Please provide the VERS array as arguments" + exit 1 +fi + +for EACHTYPE in "${TYPE[@]}"; do + for EACHVERS in "${VERS[@]}"; do + for EACHDIST in "${DIST[@]}"; do + ## Limit APK To Only x86_64 + if [ "$EACHDIST" = "apk" ]; then + ARCH=("x86_64") + else + ARCH=("x86_64" "armv7hl" "armv7l" "aarch64" "ppc64le" "s390x") + fi + for EACHARCH in "${ARCH[@]}"; do + if [ "$EACHDIST" = "deb" ]; then + for EACHDEB in "${DEBDISTS[@]}"; do + echo TYPE = $EACHTYPE, $EACHVERS, $EACHDIST, $EACHARCH, $EACHDEB + done + fi + + if [ "$EACHDIST" = "rpm" ]; then + for EACHRPM in "${RPMDISTS[@]}"; do + echo TYPE = $EACHTYPE, $EACHVERS, $EACHDIST, $EACHARCH, $EACHRPM + done + fi + + if [ "$EACHDIST" = "apk" ]; then + echo TYPE = $EACHTYPE, $EACHVERS, $EACHDIST, $EACHARCH + fi + done + done + done +done From a1f0ef7feb3aee5e92c6dadc3ecba49eb2ca0d0b Mon Sep 17 00:00:00 2001 From: Ndacyayisenga-droid Date: Tue, 29 Aug 2023 12:54:59 +0300 Subject: [PATCH 2/2] Update the script --- linux/scripts/artifacts.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/linux/scripts/artifacts.sh b/linux/scripts/artifacts.sh index ee00a7ac5..64c881765 100755 --- a/linux/scripts/artifacts.sh +++ b/linux/scripts/artifacts.sh @@ -18,21 +18,28 @@ for EACHTYPE in "${TYPE[@]}"; do if [ "$EACHDIST" = "apk" ]; then ARCH=("x86_64") else - ARCH=("x86_64" "armv7hl" "armv7l" "aarch64" "ppc64le" "s390x") - fi - for EACHARCH in "${ARCH[@]}"; do + # Exclude specific architectures based on conditions + ARCH=("x86_64" "aarch64" "ppc64le") if [ "$EACHDIST" = "deb" ]; then + if [ "$EACHVERS" != "8.0.382.0.0.5-1" ]; then + ARCH+=("armv7l") + fi for EACHDEB in "${DEBDISTS[@]}"; do echo TYPE = $EACHTYPE, $EACHVERS, $EACHDIST, $EACHARCH, $EACHDEB done fi if [ "$EACHDIST" = "rpm" ]; then + if [ "$EACHVERS" != "8.0.382.0.0.5-1" ]; then + ARCH+=("armv7hl") + fi for EACHRPM in "${RPMDISTS[@]}"; do echo TYPE = $EACHTYPE, $EACHVERS, $EACHDIST, $EACHARCH, $EACHRPM done fi + fi + for EACHARCH in "${ARCH[@]}"; do if [ "$EACHDIST" = "apk" ]; then echo TYPE = $EACHTYPE, $EACHVERS, $EACHDIST, $EACHARCH fi