Skip to content

Revert Alpine 3.5 upgrade in 7 and 8 (leaving 9 on Alpine 3.5) #92

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

Merged
merged 1 commit into from
Jan 5, 2017
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion 7-jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM alpine:3.5
FROM alpine:3.4

# A few problems with compiling Java from source:
# 1. Oracle. Licensing prevents us from redistributing the official JDK.
Expand Down
2 changes: 1 addition & 1 deletion 7-jre/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM alpine:3.5
FROM alpine:3.4

# A few problems with compiling Java from source:
# 1. Oracle. Licensing prevents us from redistributing the official JDK.
Expand Down
4 changes: 2 additions & 2 deletions 8-jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM alpine:3.5
FROM alpine:3.4

# A few problems with compiling Java from source:
# 1. Oracle. Licensing prevents us from redistributing the official JDK.
Expand All @@ -27,7 +27,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin

ENV JAVA_VERSION 8u111
ENV JAVA_ALPINE_VERSION 8.111.14-r1
ENV JAVA_ALPINE_VERSION 8.111.14-r0

RUN set -x \
&& apk add --no-cache \
Expand Down
4 changes: 2 additions & 2 deletions 8-jre/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM alpine:3.5
FROM alpine:3.4

# A few problems with compiling Java from source:
# 1. Oracle. Licensing prevents us from redistributing the official JDK.
Expand All @@ -27,7 +27,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk/jre
ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin

ENV JAVA_VERSION 8u111
ENV JAVA_ALPINE_VERSION 8.111.14-r1
ENV JAVA_ALPINE_VERSION 8.111.14-r0

RUN set -x \
&& apk add --no-cache \
Expand Down
21 changes: 14 additions & 7 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ declare -A suites=(
[8]='jessie'
[9]='sid'
)
declare -A alpineVersions=(
[7]='3.4'
[8]='3.4'
[9]='3.5'
)

declare -A addSuites=(
[8]='jessie-backports'
Expand All @@ -26,10 +31,6 @@ declare -A variants=(
[jdk]='scm'
)

alpineVersion='3.5'
alpineMirror="http://dl-cdn.alpinelinux.org/alpine/v${alpineVersion}/community/x86_64"
curl -fsSL'#' "$alpineMirror/APKINDEX.tar.gz" | tar -zxv APKINDEX

declare -A debCache=()

java-home-script() {
Expand Down Expand Up @@ -172,6 +173,7 @@ EOD

variant='alpine'
if [ -d "$version/$variant" ]; then
alpineVersion="${alpineVersions[$javaVersion]}"
alpinePackage="openjdk$javaVersion"
alpineJavaHome="/usr/lib/jvm/java-1.${javaVersion}-openjdk"
alpinePathAdd="$alpineJavaHome/jre/bin:$alpineJavaHome/bin"
Expand All @@ -183,7 +185,14 @@ EOD
alpineJavaHome+="/$javaType"
;;
esac
alpinePackageVersion="$(awk -F: '$1 == "P" { pkg = $2 } pkg == "'"$alpinePackage"'" && $1 == "V" { print $2 }' APKINDEX)"

alpineMirror="http://dl-cdn.alpinelinux.org/alpine/v${alpineVersion}/community/x86_64"
alpinePackageVersion="$(
curl -fsSL "$alpineMirror/APKINDEX.tar.gz" \
| tar --extract --gzip --to-stdout APKINDEX \
| awk -F: '$1 == "P" { pkg = $2 } pkg == "'"$alpinePackage"'" && $1 == "V" { print $2 }'
)"

alpineFullVersion="${alpinePackageVersion/./u}"
alpineFullVersion="${alpineFullVersion%%.*}"

Expand Down Expand Up @@ -232,5 +241,3 @@ done

travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
echo "$travis" > .travis.yml

rm APKINDEX