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

Enable test specified docker image in grinder #4562

Merged
merged 4 commits into from
May 10, 2023
Merged
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
26 changes: 16 additions & 10 deletions external/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test=derby
testtarget=""
platform="linux_x86-64"
portable="false"
job_name=$JOB_NAME
docker_image_source_job_name=""
build_number=$BUILD_NUMBER
node_name=""
node_labels=""
Expand Down Expand Up @@ -172,7 +172,7 @@ parseCommandLineArgs() {
docker_registry_dir="$1"; shift;
docker_registry_dir=$(echo "$docker_registry_dir" | tr '[:upper:]' '[:lower:]') # docker registry link must be lowercase
IFS=':' read -r -a dir_array <<< "$docker_registry_dir"
job_name=${dir_array[0]}
docker_image_source_job_name=${dir_array[0]}
build_number=${dir_array[1]};;

"--criu_default_image_job_name" )
Expand Down Expand Up @@ -291,7 +291,7 @@ if [ $command_type == "run" ]; then
echo "Private Docker Registry login starts:"
echo $DOCKER_REGISTRY_CREDENTIALS_PSW | $container_login --username=$DOCKER_REGISTRY_CREDENTIALS_USR --password-stdin $docker_registry_url

restore_ready_checkpoint_image_folder="${docker_registry_url}/${job_name}/${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${platform}-${node_label_current_os}-${node_label_micro_architecture}"
restore_ready_checkpoint_image_folder="${docker_registry_url}/${docker_image_source_job_name}/${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${platform}-${node_label_current_os}-${node_label_micro_architecture}"
tagged_restore_ready_checkpoint_image_num="${restore_ready_checkpoint_image_folder}:${build_number}"

# Push a docker image with build_num for records
Expand Down Expand Up @@ -329,12 +329,17 @@ if [ $command_type == "load" ]; then

restore_docker_image_name_list=()

echo "Testing images from nightly builds"
image_os_micro_architecture_list=($criu_combo_os_microarch_list)
for image_os_micro_architecture in ${image_os_micro_architecture_list[@]}
do
restore_docker_image_name_list+=("${docker_registry_url}/$job_name/${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${platform}-${image_os_micro_architecture}:${build_number}")
done
if [[ $JOB_NAME == "Grinder" ]]; then
echo "Testing image from docker_registry_dir"
restore_docker_image_name_list+=("${docker_registry_url}/$docker_image_source_job_name:${build_number}")
else
echo "Testing images from nightly builds"
image_os_micro_architecture_list=($criu_combo_os_microarch_list)
for image_os_micro_architecture in ${image_os_micro_architecture_list[@]}
do
restore_docker_image_name_list+=("${docker_registry_url}/$docker_image_source_job_name/${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${platform}-${image_os_micro_architecture}:${build_number}")
done
fi

echo "The host machine OS is ${node_label_current_os}, and micro-architecture is ${node_label_micro_architecture}"
for restore_docker_image_name in ${restore_docker_image_name_list[@]}
Expand Down Expand Up @@ -376,5 +381,6 @@ if [ $command_type == "clean" ]; then
fi
$container_rm -f $test-test; $container_rmi -f adoptopenjdk-$test-test:${JDK_VERSION}-$package-$docker_os-${JDK_IMPL}-$build_type
$container_rm -f restore-test
$container_rmi -f ${docker_registry_url}/${job_name}/${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${platform}-${node_label_current_os}-${node_label_micro_architecture}:${build_number}
$container_rmi -f ${docker_registry_url}/${docker_image_source_job_name}/${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${platform}-${node_label_current_os}-${node_label_micro_architecture}:${build_number}
$container_rmi -f ${docker_registry_url}/${docker_image_source_job_name}:${build_number}
fi