Skip to content

Commit

Permalink
Match HTTPS URL's when downloading JDK
Browse files Browse the repository at this point in the history
  • Loading branch information
joakiboxxx committed Feb 4, 2019
1 parent 3852d57 commit d621ec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nomad/scripts/install-java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ download_jdk() {
readonly JDK_DOWNLOAD_URL2=$(${curl_cmd} ${JDK_DOWNLOAD_URL1} | egrep -o "\/technetwork\/java/\javase\/downloads\/jdk${JDK_VERSION}-downloads-.+?\.html" | head -1 | cut -d '"' -f 1)
[[ -z "${JDK_DOWNLOAD_URL2}" ]] && echo "Could not get jdk download url - ${JDK_DOWNLOAD_URL1}" && exit 1
readonly JDK_DOWNLOAD_URL3="${URL}${JDK_DOWNLOAD_URL2}"
readonly JDK_DOWNLOAD_URL4=$(${curl_cmd} ${JDK_DOWNLOAD_URL3} | egrep -o "http\:\/\/download.oracle\.com\/otn-pub\/java\/jdk\/[7-8]u[0-9]+\-(.*)+\/jdk-[7-8]u[0-9]+(.*)linux-x64.${EXT}" | tail -1)
readonly JDK_DOWNLOAD_URL4=$(${curl_cmd} ${JDK_DOWNLOAD_URL3} | egrep -o "http(s?)\:\/\/download.oracle\.com\/otn-pub\/java\/jdk\/[7-8]u[0-9]+\-(.*)+\/jdk-[7-8]u[0-9]+(.*)linux-x64.${EXT}" | tail -1)
for DL_URL in "${JDK_DOWNLOAD_URL4[@]}"; do
wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" -N ${DL_URL}
done
Expand Down

2 comments on commit d621ec3

@bensojona
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity Solution Engineering / Packer Templates Build 664 is now running

@bensojona
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity Solution Engineering / Packer Templates Build 664 outcome was FAILURE
Summary: Build stopped: Script exited with non-zero exit status: 1; build stopped: Image failed to build due to error; exit code 137 (Step: Image Publish (Command Line)) Build time: 00:05:36

Please sign in to comment.