Skip to content

Commit 8e81db3

Browse files
authored
Merge pull request #117 from dinogun/manifest_test_jre_updates
Update manifest and test scripts to support the JRE tags.
2 parents 83650e2 + cdb379b commit 8e81db3

4 files changed

+68
-52
lines changed

common_functions.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,19 @@ function check_manifest_tool() {
208208
function build_tags() {
209209
vm=$1; shift
210210
ver=$1; shift;
211+
pkg=$1; shift;
211212
rel=$1; shift;
212213
os=$1; shift;
213214
build=$1; shift;
214215
rawtags=$*
215216
tmpfile=raw_arch_tags.$$.tmp
216217

218+
# For jre builds, replace the version tag to distinguish it from the jdk
219+
if [ "${pkg}" == "jre" ]; then
220+
rel=$(echo ${rel} | sed 's/jdk/jre/')
221+
fi
217222
# Get the list of supported arches for this vm / ver /os combo
218-
arches=$(parse_vm_entry ${vm} ${ver} ${os} "Architectures:")
223+
arches=$(parse_vm_entry ${vm} ${ver} ${pkg} ${os} "Architectures:")
219224
# Replace the proper version string in the tags
220225
rtags=$(echo ${rawtags} | sed "s/{{ JDK_${build}_VER }}/${rel}/gI; s/{{ OS }}/${os}/gI;");
221226
echo ${rtags} | sed "s/{{ *ARCH *}}/{{ARCH}}/" |

generate_latest_sums.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ fi
2626
echo "Getting latest shasum info for major version: ${version}"
2727
for vm in ${all_jvms}
2828
do
29-
get_shasums ${version} ${vm}
29+
for package in ${all_packages}
30+
do
31+
get_shasums ${version} ${vm} ${package}
32+
done
3033
done

generate_manifest_script.sh

+29-24
Original file line numberDiff line numberDiff line change
@@ -106,33 +106,38 @@ echo >> ${man_file}
106106
# type = full / slim
107107
for vm in ${available_jvms}
108108
do
109-
for os in ${oses}
109+
for package in ${all_packages}
110110
do
111-
builds=$(parse_vm_entry ${vm} ${version} ${os} "Build:")
112-
btypes=$(parse_vm_entry ${vm} ${version} ${os} "Type:")
113-
for build in ${builds}
111+
for os in ${oses}
114112
do
115-
shasums="${package}"_"${vm}"_"${version}"_"${build}"_sums
116-
jverinfo=${shasums}[version]
117-
eval jrel=\${$jverinfo}
118-
if [[ -z ${jrel} ]]; then
119-
continue;
120-
fi
121-
# Docker image tags cannot have "+" in them, replace it with "." instead.
122-
rel=$(echo ${jrel} | sed 's/+/./g')
123-
124-
srepo=${source_repo}${version}
125-
if [ "${vm}" != "hotspot" ]; then
126-
srepo=${srepo}-${vm}
127-
fi
128-
for btype in ${btypes}
113+
# Build = Release or Nightly
114+
builds=$(parse_vm_entry ${vm} ${version} ${package} ${os} "Build:")
115+
# Type = Full or Slim
116+
btypes=$(parse_vm_entry ${vm} ${version} ${package} ${os} "Type:")
117+
for build in ${builds}
129118
do
130-
echo -n "INFO: Building tag list for [${vm}]-[${os}]-[${build}]-[${btype}]..."
131-
# Get the relevant tags for this vm / os / build / type combo from the tags.config file
132-
raw_tags=$(parse_tag_entry ${os} ${build} ${btype})
133-
build_tags ${vm} ${version} ${rel} ${os} ${build} ${raw_tags}
134-
echo "done"
135-
print_tags ${srepo}
119+
shasums="${package}"_"${vm}"_"${version}"_"${build}"_sums
120+
jverinfo=${shasums}[version]
121+
eval jrel=\${$jverinfo}
122+
if [[ -z ${jrel} ]]; then
123+
continue;
124+
fi
125+
# Docker image tags cannot have "+" in them, replace it with "." instead.
126+
rel=$(echo ${jrel} | sed 's/+/./g')
127+
128+
srepo=${source_repo}${version}
129+
if [ "${vm}" != "hotspot" ]; then
130+
srepo=${srepo}-${vm}
131+
fi
132+
for btype in ${btypes}
133+
do
134+
echo -n "INFO: Building tag list for [${vm}]-[${package}]-[${os}]-[${build}]-[${btype}]..."
135+
# Get the relevant tags for this vm / os / build / type combo from the tags.config file
136+
raw_tags=$(parse_tag_entry ${os} ${package} ${build} ${btype})
137+
build_tags ${vm} ${version} ${package} ${rel} ${os} ${build} ${raw_tags}
138+
echo "done"
139+
print_tags ${srepo}
140+
done
136141
done
137142
done
138143
done

test_multiarch.sh

+29-26
Original file line numberDiff line numberDiff line change
@@ -125,35 +125,38 @@ fi
125125
# type = full / slim
126126
for vm in ${available_jvms}
127127
do
128-
for os in ${oses}
128+
for package in ${all_packages}
129129
do
130-
builds=$(parse_vm_entry ${vm} ${version} ${os} "Build:")
131-
btypes=$(parse_vm_entry ${vm} ${version} ${os} "Type:")
132-
for build in ${builds}
130+
for os in ${oses}
133131
do
134-
shasums="${package}"_"${vm}"_"${version}"_"${build}"_sums
135-
jverinfo=${shasums}[version]
136-
eval jrel=\${$jverinfo}
137-
if [[ -z ${jrel} ]]; then
138-
continue;
139-
fi
140-
# Docker image tags cannot have "+" in them, replace it with "." instead.
141-
rel=$(echo ${jrel} | sed 's/+/./g')
142-
143-
srepo=${source_repo}${version}
144-
if [ "${vm}" != "hotspot" ]; then
145-
srepo=${srepo}-${vm}
146-
fi
147-
for btype in ${btypes}
132+
builds=$(parse_vm_entry ${vm} ${version} ${package} ${os} "Build:")
133+
btypes=$(parse_vm_entry ${vm} ${version} ${package} ${os} "Type:")
134+
for build in ${builds}
148135
do
149-
echo -n "INFO: Building tag list for [${vm}]-[${os}]-[${build}]-[${btype}]..."
150-
# Get the relevant tags for this vm / os / build / type combo from the tags.config file.
151-
raw_tags=$(parse_tag_entry ${os} ${build} ${btype})
152-
# Build tags will build both the arch specific tags and the tag aliases.
153-
build_tags ${vm} ${version} ${rel} ${os} ${build} ${raw_tags}
154-
echo "done"
155-
# Test both the arch specific tags and the tag aliases.
156-
test_image_types ${srepo}
136+
shasums="${package}"_"${vm}"_"${version}"_"${build}"_sums
137+
jverinfo=${shasums}[version]
138+
eval jrel=\${$jverinfo}
139+
if [[ -z ${jrel} ]]; then
140+
continue;
141+
fi
142+
# Docker image tags cannot have "+" in them, replace it with "." instead.
143+
rel=$(echo ${jrel} | sed 's/+/./g')
144+
145+
srepo=${source_repo}${version}
146+
if [ "${vm}" != "hotspot" ]; then
147+
srepo=${srepo}-${vm}
148+
fi
149+
for btype in ${btypes}
150+
do
151+
echo -n "INFO: Building tag list for [${vm}]-[${os}]-[${build}]-[${btype}]..."
152+
# Get the relevant tags for this vm / os / build / type combo from the tags.config file.
153+
raw_tags=$(parse_tag_entry ${os} ${build} ${btype})
154+
# Build tags will build both the arch specific tags and the tag aliases.
155+
build_tags ${vm} ${version} ${package} ${rel} ${os} ${build} ${raw_tags}
156+
echo "done"
157+
# Test both the arch specific tags and the tag aliases.
158+
test_image_types ${srepo}
159+
done
157160
done
158161
done
159162
done

0 commit comments

Comments
 (0)