Skip to content

Commit

Permalink
Update manifest and test scripts to support the JRE tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
dinogun committed Mar 7, 2019
1 parent 83650e2 commit cdb379b
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 52 deletions.
7 changes: 6 additions & 1 deletion common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,19 @@ function check_manifest_tool() {
function build_tags() {
vm=$1; shift
ver=$1; shift;
pkg=$1; shift;
rel=$1; shift;
os=$1; shift;
build=$1; shift;
rawtags=$*
tmpfile=raw_arch_tags.$$.tmp

# For jre builds, replace the version tag to distinguish it from the jdk
if [ "${pkg}" == "jre" ]; then
rel=$(echo ${rel} | sed 's/jdk/jre/')
fi
# Get the list of supported arches for this vm / ver /os combo
arches=$(parse_vm_entry ${vm} ${ver} ${os} "Architectures:")
arches=$(parse_vm_entry ${vm} ${ver} ${pkg} ${os} "Architectures:")
# Replace the proper version string in the tags
rtags=$(echo ${rawtags} | sed "s/{{ JDK_${build}_VER }}/${rel}/gI; s/{{ OS }}/${os}/gI;");
echo ${rtags} | sed "s/{{ *ARCH *}}/{{ARCH}}/" |
Expand Down
5 changes: 4 additions & 1 deletion generate_latest_sums.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ fi
echo "Getting latest shasum info for major version: ${version}"
for vm in ${all_jvms}
do
get_shasums ${version} ${vm}
for package in ${all_packages}
do
get_shasums ${version} ${vm} ${package}
done
done
53 changes: 29 additions & 24 deletions generate_manifest_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,33 +106,38 @@ echo >> ${man_file}
# type = full / slim
for vm in ${available_jvms}
do
for os in ${oses}
for package in ${all_packages}
do
builds=$(parse_vm_entry ${vm} ${version} ${os} "Build:")
btypes=$(parse_vm_entry ${vm} ${version} ${os} "Type:")
for build in ${builds}
for os in ${oses}
do
shasums="${package}"_"${vm}"_"${version}"_"${build}"_sums
jverinfo=${shasums}[version]
eval jrel=\${$jverinfo}
if [[ -z ${jrel} ]]; then
continue;
fi
# Docker image tags cannot have "+" in them, replace it with "." instead.
rel=$(echo ${jrel} | sed 's/+/./g')

srepo=${source_repo}${version}
if [ "${vm}" != "hotspot" ]; then
srepo=${srepo}-${vm}
fi
for btype in ${btypes}
# Build = Release or Nightly
builds=$(parse_vm_entry ${vm} ${version} ${package} ${os} "Build:")
# Type = Full or Slim
btypes=$(parse_vm_entry ${vm} ${version} ${package} ${os} "Type:")
for build in ${builds}
do
echo -n "INFO: Building tag list for [${vm}]-[${os}]-[${build}]-[${btype}]..."
# Get the relevant tags for this vm / os / build / type combo from the tags.config file
raw_tags=$(parse_tag_entry ${os} ${build} ${btype})
build_tags ${vm} ${version} ${rel} ${os} ${build} ${raw_tags}
echo "done"
print_tags ${srepo}
shasums="${package}"_"${vm}"_"${version}"_"${build}"_sums
jverinfo=${shasums}[version]
eval jrel=\${$jverinfo}
if [[ -z ${jrel} ]]; then
continue;
fi
# Docker image tags cannot have "+" in them, replace it with "." instead.
rel=$(echo ${jrel} | sed 's/+/./g')

srepo=${source_repo}${version}
if [ "${vm}" != "hotspot" ]; then
srepo=${srepo}-${vm}
fi
for btype in ${btypes}
do
echo -n "INFO: Building tag list for [${vm}]-[${package}]-[${os}]-[${build}]-[${btype}]..."
# Get the relevant tags for this vm / os / build / type combo from the tags.config file
raw_tags=$(parse_tag_entry ${os} ${package} ${build} ${btype})
build_tags ${vm} ${version} ${package} ${rel} ${os} ${build} ${raw_tags}
echo "done"
print_tags ${srepo}
done
done
done
done
Expand Down
55 changes: 29 additions & 26 deletions test_multiarch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,35 +125,38 @@ fi
# type = full / slim
for vm in ${available_jvms}
do
for os in ${oses}
for package in ${all_packages}
do
builds=$(parse_vm_entry ${vm} ${version} ${os} "Build:")
btypes=$(parse_vm_entry ${vm} ${version} ${os} "Type:")
for build in ${builds}
for os in ${oses}
do
shasums="${package}"_"${vm}"_"${version}"_"${build}"_sums
jverinfo=${shasums}[version]
eval jrel=\${$jverinfo}
if [[ -z ${jrel} ]]; then
continue;
fi
# Docker image tags cannot have "+" in them, replace it with "." instead.
rel=$(echo ${jrel} | sed 's/+/./g')

srepo=${source_repo}${version}
if [ "${vm}" != "hotspot" ]; then
srepo=${srepo}-${vm}
fi
for btype in ${btypes}
builds=$(parse_vm_entry ${vm} ${version} ${package} ${os} "Build:")
btypes=$(parse_vm_entry ${vm} ${version} ${package} ${os} "Type:")
for build in ${builds}
do
echo -n "INFO: Building tag list for [${vm}]-[${os}]-[${build}]-[${btype}]..."
# Get the relevant tags for this vm / os / build / type combo from the tags.config file.
raw_tags=$(parse_tag_entry ${os} ${build} ${btype})
# Build tags will build both the arch specific tags and the tag aliases.
build_tags ${vm} ${version} ${rel} ${os} ${build} ${raw_tags}
echo "done"
# Test both the arch specific tags and the tag aliases.
test_image_types ${srepo}
shasums="${package}"_"${vm}"_"${version}"_"${build}"_sums
jverinfo=${shasums}[version]
eval jrel=\${$jverinfo}
if [[ -z ${jrel} ]]; then
continue;
fi
# Docker image tags cannot have "+" in them, replace it with "." instead.
rel=$(echo ${jrel} | sed 's/+/./g')

srepo=${source_repo}${version}
if [ "${vm}" != "hotspot" ]; then
srepo=${srepo}-${vm}
fi
for btype in ${btypes}
do
echo -n "INFO: Building tag list for [${vm}]-[${os}]-[${build}]-[${btype}]..."
# Get the relevant tags for this vm / os / build / type combo from the tags.config file.
raw_tags=$(parse_tag_entry ${os} ${build} ${btype})
# Build tags will build both the arch specific tags and the tag aliases.
build_tags ${vm} ${version} ${package} ${rel} ${os} ${build} ${raw_tags}
echo "done"
# Test both the arch specific tags and the tag aliases.
test_image_types ${srepo}
done
done
done
done
Expand Down

0 comments on commit cdb379b

Please sign in to comment.