Skip to content

Commit 781d698

Browse files
authoredFeb 25, 2025··
Supporting multiple ubi versions (#5474)
* modified the ubi version validation code * Update currency-build.yml * Update jaeger_ubi_9.3.sh * Update jaeger_ubi_9.3.sh * Update currency-build.yml
1 parent 76ae5ca commit 781d698

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎script/build_package.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,22 @@ docker_build_non_root() {
1919
}
2020

2121
#Below conditions are used to select the base image based on the 2 flags, tested_on and non_root_build. A docker_build_non_root function is called when non root build is true.
22-
if [[ "$TESTED_ON" == UBI:9* || "$TESTED_ON" == UBI9* ]];
22+
if [[ "$TESTED_ON" == UBI:9* || "$TESTED_ON" == UBI9* ]];
2323
then
24-
docker pull registry.access.redhat.com/ubi9/ubi:9.3
25-
docker_image="registry.access.redhat.com/ubi9/ubi:9.3"
24+
ubi_version=$(echo "$TESTED_ON" | grep -oE '[0-9]+\.[0-9]+')
25+
docker pull registry.access.redhat.com/ubi9/ubi:$ubi_version
26+
docker_image="registry.access.redhat.com/ubi9/ubi:$ubi_version"
2627
if [[ "$NON_ROOT_BUILD" == "true" ]];
2728
then
28-
docker_build_non_root "registry.access.redhat.com/ubi9/ubi:9.3"
29+
docker_build_non_root "registry.access.redhat.com/ubi9/ubi:$ubi_version"
2930
fi
3031
else
3132
docker pull registry.access.redhat.com/ubi8/ubi:8.7
3233
docker_image="registry.access.redhat.com/ubi8/ubi:8.7"
3334
if [[ "$NON_ROOT_BUILD" == "true" ]];
3435
then
3536
docker_build_non_root "registry.access.redhat.com/ubi8/ubi:8.7"
36-
fi
37+
fi
3738
fi
3839

3940
python3 script/validate_builds_currency.py "$PKG_DIR_PATH$BUILD_SCRIPT" "$VERSION" "$docker_image" > build_log &

0 commit comments

Comments
 (0)
Please sign in to comment.