Skip to content

Commit

Permalink
Remove check_version in common_functions.sh
Browse files Browse the repository at this point in the history
- remove check_version function
- remove set_version function
- remove supported_versions
resolves : #4949

Signed-off-by: Anna Babu Palathingal <[email protected]>
  • Loading branch information
annaibm committed Jan 31, 2024
1 parent d4b2efe commit 3593e29
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 55 deletions.
45 changes: 21 additions & 24 deletions external/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,24 @@ cleanup_images
# Loop through all possible images
for test in ${supported_tests}
do
for version in ${supported_versions}
do
for vm in ${supported_jvms}
do
for os in ${supported_os}
do
for package in ${supported_packages}
do
for build in ${supported_builds}
do
echo "==============================================================================="
echo " "
echo " Building Docker Images for ${test} ${version} ${vm} ${os} ${package} ${build} "
echo " "
echo "==============================================================================="
$(dirname "$0")/build_image.sh ${test} ${version} ${vm} ${os} ${package} ${build}
echo
echo
done
done
done
done
done
done
for vm in ${supported_jvms}
do
for os in ${supported_os}
do
for package in ${supported_packages}
do
for build in ${supported_builds}
do
echo "==============================================================================="
echo " "
echo " Building Docker Images for ${test} ${version} ${vm} ${os} ${package} ${build} "
echo " "
echo "==============================================================================="
$(dirname "$0")/build_image.sh ${test} ${version} ${vm} ${os} ${package} ${build}
echo
echo
done
done
done
done
done
2 changes: 0 additions & 2 deletions external/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ if [ $# -ne 9 ] && [ $# -ne 10 ]; then
echo
echo "usage: $0 test version vm os package build platform check_external_custom"
echo "test = ${supported_tests}"
echo "version = ${supported_versions}"
echo "vm = ${supported_jvms}"
echo "os = ${supported_os}"
echo "package = ${supported_packages}"
Expand All @@ -42,7 +41,6 @@ check_external_custom=$9
if [[ "${check_external_custom}" == "0" ]]; then
set_test $1
fi
set_version $2
set_vm $3
set_os $4
set_package $5
Expand Down
30 changes: 1 addition & 29 deletions external/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Supported versions
supported_versions="8 11 17 21 22"

# Supported JVMs
supported_jvms="hotspot openj9"

Expand All @@ -32,30 +28,6 @@ supported_builds="full"
# Supported tests
supported_tests="external_custom camel criu-functional criu-portable-checkpoint criu-portable-restore criu-ubi-portable-checkpoint criu-ubi-portable-restore derby elasticsearch jacoco jenkins functional-test kafka lucene-solr openliberty-mp-tck payara-mp-tck quarkus quarkus_quickstarts scala system-test tomcat tomee wildfly wycheproof netty spring zookeeper"

function check_version() {
version=$1

for current_version in ${supported_versions}
do
if [[ "${version}" == "${current_version}" ]]; then
return 1
fi
done

return 0
}

# Set a valid version
function set_version() {
version=$1

if (check_version ${version}); then
echo "ERROR: Invalid Version: ${version}"
echo "Usage: $0 [${supported_versions}]"
exit 1
fi
}

function check_os() {
os=$1

Expand Down Expand Up @@ -213,7 +185,7 @@ function set_test_info() {
check_external_custom_test=$2
cd ../
path_to_file=$(pwd)
echo ${path_to_file}
echo ${path_to_file}
PROPERTY_FILE=${path_to_file}/${test}/test.properties
github_url=$(getProperty "github_url")
test_options=$(getProperty "test_options")
Expand Down

0 comments on commit 3593e29

Please sign in to comment.