Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance SBOM and JDK file check #4078

Merged
merged 6 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions test/system/reproducibleCompare/reproducible.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,29 @@
# ********************************************************************************

ifndef SBOM_FILE
SBOM_FILE := $(shell ls $(TEST_ROOT)/../jdkbinary/ | grep "sbom" | grep -v "metadata")
SBOM_FILE := $(TEST_ROOT)/../jdkbinary/$(SBOM_FILE)
SBOM_FILE := $(shell ls $(TEST_ROOT)/../jdkbinary/ | grep "sbom" | grep -v "metadata")
ifeq ($(strip $(SBOM_FILE)),)
$(info ERROR! NO SBOM_FILE AVAILABLE)
SBOM_FILE :=
else
SBOM_FILE := $(TEST_ROOT)/../jdkbinary/$(SBOM_FILE)
endif
endif

ifndef JDK_FILE
JDK_FILE := $(shell find $(TEST_ROOT)/../jdkbinary/ -type f -name '*-jdk_*.tar.gz')
ifneq (,$(findstring win,$(SPEC)))
JDK_FILE := $(shell find $(TEST_ROOT)/../jdkbinary/ -type f -name '*-jdk_*.zip')
endif
JDK_FILE := $(shell find $(TEST_ROOT)/../jdkbinary/ -type f -name '*-jdk_*.tar.gz')
ifneq (,$(findstring win,$(SPEC)))
JDK_FILE := $(shell find $(TEST_ROOT)/../jdkbinary/ -type f -name '*-jdk_*.zip')
endif
ifeq ($(strip $(JDK_FILE)),)
$(info ERROR! NO JDK_FILE AVAILABLE)
endif
endif

ifneq (,$(findstring linux,$(SPEC)))
SBOM_FILE := $(subst $(TEST_ROOT)/../jdkbinary,/home/jenkins/test,$(SBOM_FILE))
ifneq ($(strip $(SBOM_FILE)),)
SBOM_FILE := $(subst $(TEST_ROOT)/../jdkbinary,/home/jenkins/test,$(SBOM_FILE))
endif
endif

RM_DEBUGINFO := $(shell find $(TEST_JDK_HOME) -type f -name "*.debuginfo" -delete)
2 changes: 1 addition & 1 deletion tooling/reproducible/macos_repro_build_compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -e

# Check All 3 Params Are Supplied
if [ "$#" -lt 3 ]; then
echo "Usage: $0 SBOM_URL/SBOM_PATH JDKZIP_URL/JDKZIP_PATH"
echo "Usage: $0 SBOM_URL/SBOM_PATH JDKZIP_URL/JDKZIP_PATH REPORT_DIR"
echo ""
echo "1. SBOM_URL/SBOM_PATH - should be the FULL path OR a URL to a Temurin JDK SBOM JSON file in CycloneDX Format"
echo " eg. https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-sbom_x64_mac_hotspot_21.0.3_9.json"
Expand Down
6 changes: 4 additions & 2 deletions tooling/reproducible/windows_repro_build_compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@
set -e

# Check All 3 Params Are Supplied
if [ "$#" -lt 2 ]; then
echo "Usage: $0 SBOM_URL/SBOM_PATH JDKZIP_URL/JDKZIP_PATH"
if [ "$#" -lt 3 ]; then
echo "Usage: $0 SBOM_URL/SBOM_PATH JDKZIP_URL/JDKZIP_PATH REPORT_DIR"
echo ""
echo "1. SBOM_URL/SBOM_PATH - should be the FULL path OR a URL to a Temurin JDK SBOM JSON file in CycloneDX Format"
echo " eg. https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-sbom_x64_windows_hotspot_21.0.2_13.json"
echo ""
echo "2. JDKZIP_URL/JDKZIP_PATH - should be the FULL path OR a URL to a Temurin Windows JDK Zip file"
echo " eg. https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip"
echo ""
echo "3. REPORT_DIR - should be the FULL path OR a URL to the output directory for the comparison report"
echo ""
exit 1
fi

Expand Down
Loading