Commit 46961600 authored by Eric Timmons's avatar Eric Timmons

Add nightly Linux images

parent ef46dc1b
......@@ -29,7 +29,7 @@ Generate manifest:
- |
echo "GitFetch: refs/heads/$CI_COMMIT_REF_NAME" > "build/$CI_PROJECT_NAME"
- |
./generate-stackbrew-library.sh >> "build/$CI_PROJECT_NAME"
./generate-stackbrew-library.sh all >> "build/$CI_PROJECT_NAME"
- sed -i "s/github.com/gitlab.common-lisp.net/" "build/$CI_PROJECT_NAME"
artifacts:
paths:
......
FROM PLACEHOLDER
ENV ABCL_COMMIT PLACEHOLDER
WORKDIR /usr/local/src/
RUN set -x \
# Install ant
&& ANT_VERSION="1.10.9" \
&& curl -fsSL "https://mirrors.gigenet.com/apache/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" > "ant-$ANT_VERSION.tar.gz" \
&& tar xf "ant-$ANT_VERSION.tar.gz" \
&& PATH="/usr/local/src/apache-ant-$ANT_VERSION/bin:$PATH" \
&& ANT_HOME="/usr/local/src/apache-ant-$ANT_VERSION" \
&& export ANT_HOME \
# Install ABCL
&& curl -fsSL "https://github.com/armedbear/abcl/archive/$ABCL_COMMIT.tar.gz" > "abcl-$ABCL_COMMIT.tar.gz" \
&& tar xf "abcl-$ABCL_COMMIT.tar.gz" \
&& JAVA_MAJOR_VERSION="${JAVA_VERSION%%.*}" \
&& JAVA_MAJOR_VERSION="${JAVA_MAJOR_VERSION%%u*}" \
&& export JAVA_MAJOR_VERSION \
&& mkdir /usr/local/share/abcl/ \
&& (cd "abcl-$ABCL_COMMIT" && bash ./ci/create-abcl-properties.bash "openjdk$JAVA_MAJOR_VERSION" && ant && cp dist/* /usr/local/share/abcl ) \
&& rm -rf abcl* ant* apache-ant* \
&& java -jar /usr/local/share/abcl/abcl.jar --eval '(print (multiple-value-list (lisp-implementation-version)))' --eval '(quit)'
WORKDIR /
COPY abcl-wrapper /usr/local/bin/abcl
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["abcl"]
......@@ -12,9 +12,18 @@ defaultJavaVersion='15'
self="$(basename "$BASH_SOURCE")"
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
versions=( */ )
versions=( "${versions[@]%/}" )
versions=( "${versions[@]/nightly}" )
if [ "${1-unset}" = "nightly" ]; then
versions=( nightly )
aliases[nightly]="$(grep -e "^ENV ABCL_COMMIT" nightly/buster/jdk-11/Dockerfile | cut -d" " -f 3 | head -c 7)"
elif [ "${1-unset}" = "all" ]; then
versions=( */ )
versions=( "${versions[@]%/}" )
aliases[nightly]="$(grep -e "^ENV ABCL_COMMIT" nightly/buster/jdk-11/Dockerfile | cut -d" " -f 3 | head -c 7)"
else
versions=( */ )
versions=( "${versions[@]%/}" )
versions=( "${versions[@]/nightly}" )
fi
# sort version numbers with highest first
IFS=$'\n'; versions=( $(echo "${versions[*]}" | sort -rV) ); unset IFS
......@@ -82,6 +91,10 @@ for version in "${versions[@]}"; do
javaType="${javaVariant%-*}"
dir="$version/$v"
if [ "$version" = "nightly" ] && [[ "$os" == "windowsservercore"* ]]; then
continue
fi
[ -f "$dir/Dockerfile" ] || continue
commit="$(dirCommit "$dir")"
......
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM openjdk:11-jdk-buster
ENV ABCL_COMMIT 9c0a9693ea933309e503266255edcde5cc76257c
WORKDIR /usr/local/src/
RUN set -x \
# Install ant
&& ANT_VERSION="1.10.9" \
&& curl -fsSL "https://mirrors.gigenet.com/apache/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" > "ant-$ANT_VERSION.tar.gz" \
&& tar xf "ant-$ANT_VERSION.tar.gz" \
&& PATH="/usr/local/src/apache-ant-$ANT_VERSION/bin:$PATH" \
&& ANT_HOME="/usr/local/src/apache-ant-$ANT_VERSION" \
&& export ANT_HOME \
# Install ABCL
&& curl -fsSL "https://github.com/armedbear/abcl/archive/$ABCL_COMMIT.tar.gz" > "abcl-$ABCL_COMMIT.tar.gz" \
&& tar xf "abcl-$ABCL_COMMIT.tar.gz" \
&& JAVA_MAJOR_VERSION="${JAVA_VERSION%%.*}" \
&& JAVA_MAJOR_VERSION="${JAVA_MAJOR_VERSION%%u*}" \
&& export JAVA_MAJOR_VERSION \
&& mkdir /usr/local/share/abcl/ \
&& (cd "abcl-$ABCL_COMMIT" && bash ./ci/create-abcl-properties.bash "openjdk$JAVA_MAJOR_VERSION" && ant && cp dist/* /usr/local/share/abcl ) \
&& rm -rf abcl* ant* apache-ant* \
&& java -jar /usr/local/share/abcl/abcl.jar --eval '(print (multiple-value-list (lisp-implementation-version)))' --eval '(quit)'
WORKDIR /
COPY abcl-wrapper /usr/local/bin/abcl
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["abcl"]
#!/bin/sh
exec java -jar /usr/local/share/abcl/abcl.jar "$@"
#!/bin/sh
# If the first arg starts with a hyphen, prepend abcl to arguments.
if [ "${1#-}" != "$1" ]; then
set -- abcl "$@"
fi
exec "$@"
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM openjdk:15-jdk-buster
ENV ABCL_COMMIT 9c0a9693ea933309e503266255edcde5cc76257c
WORKDIR /usr/local/src/
RUN set -x \
# Install ant
&& ANT_VERSION="1.10.9" \
&& curl -fsSL "https://mirrors.gigenet.com/apache/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" > "ant-$ANT_VERSION.tar.gz" \
&& tar xf "ant-$ANT_VERSION.tar.gz" \
&& PATH="/usr/local/src/apache-ant-$ANT_VERSION/bin:$PATH" \
&& ANT_HOME="/usr/local/src/apache-ant-$ANT_VERSION" \
&& export ANT_HOME \
# Install ABCL
&& curl -fsSL "https://github.com/armedbear/abcl/archive/$ABCL_COMMIT.tar.gz" > "abcl-$ABCL_COMMIT.tar.gz" \
&& tar xf "abcl-$ABCL_COMMIT.tar.gz" \
&& JAVA_MAJOR_VERSION="${JAVA_VERSION%%.*}" \
&& JAVA_MAJOR_VERSION="${JAVA_MAJOR_VERSION%%u*}" \
&& export JAVA_MAJOR_VERSION \
&& mkdir /usr/local/share/abcl/ \
&& (cd "abcl-$ABCL_COMMIT" && bash ./ci/create-abcl-properties.bash "openjdk$JAVA_MAJOR_VERSION" && ant && cp dist/* /usr/local/share/abcl ) \
&& rm -rf abcl* ant* apache-ant* \
&& java -jar /usr/local/share/abcl/abcl.jar --eval '(print (multiple-value-list (lisp-implementation-version)))' --eval '(quit)'
WORKDIR /
COPY abcl-wrapper /usr/local/bin/abcl
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["abcl"]
#!/bin/sh
exec java -jar /usr/local/share/abcl/abcl.jar "$@"
#!/bin/sh
# If the first arg starts with a hyphen, prepend abcl to arguments.
if [ "${1#-}" != "$1" ]; then
set -- abcl "$@"
fi
exec "$@"
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM openjdk:8-jdk-buster
ENV ABCL_COMMIT 9c0a9693ea933309e503266255edcde5cc76257c
WORKDIR /usr/local/src/
RUN set -x \
# Install ant
&& ANT_VERSION="1.10.9" \
&& curl -fsSL "https://mirrors.gigenet.com/apache/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" > "ant-$ANT_VERSION.tar.gz" \
&& tar xf "ant-$ANT_VERSION.tar.gz" \
&& PATH="/usr/local/src/apache-ant-$ANT_VERSION/bin:$PATH" \
&& ANT_HOME="/usr/local/src/apache-ant-$ANT_VERSION" \
&& export ANT_HOME \
# Install ABCL
&& curl -fsSL "https://github.com/armedbear/abcl/archive/$ABCL_COMMIT.tar.gz" > "abcl-$ABCL_COMMIT.tar.gz" \
&& tar xf "abcl-$ABCL_COMMIT.tar.gz" \
&& JAVA_MAJOR_VERSION="${JAVA_VERSION%%.*}" \
&& JAVA_MAJOR_VERSION="${JAVA_MAJOR_VERSION%%u*}" \
&& export JAVA_MAJOR_VERSION \
&& mkdir /usr/local/share/abcl/ \
&& (cd "abcl-$ABCL_COMMIT" && bash ./ci/create-abcl-properties.bash "openjdk$JAVA_MAJOR_VERSION" && ant && cp dist/* /usr/local/share/abcl ) \
&& rm -rf abcl* ant* apache-ant* \
&& java -jar /usr/local/share/abcl/abcl.jar --eval '(print (multiple-value-list (lisp-implementation-version)))' --eval '(quit)'
WORKDIR /
COPY abcl-wrapper /usr/local/bin/abcl
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["abcl"]
#!/bin/sh
exec java -jar /usr/local/share/abcl/abcl.jar "$@"
#!/bin/sh
# If the first arg starts with a hyphen, prepend abcl to arguments.
if [ "${1#-}" != "$1" ]; then
set -- abcl "$@"
fi
exec "$@"
......@@ -17,8 +17,15 @@ EOH
for version in "${versions[@]}"; do
abclBinZipUrl="https://abcl.org/releases/$version/abcl-bin-$version.zip"
abclBinZipSha="$(curl -fsSL "$abclBinZipUrl" | sha256sum | cut -d' ' -f1)"
if [ "$version" = "nightly" ]; then
abclGitSha="$(curl -fsSL https://api.github.com/repos/armedbear/abcl/commits/master | jq -r .sha)"
unset abclBinZipUrl
unset abclBinZipSha
else
unset abclGitSha
abclBinZipUrl="https://abcl.org/releases/$version/abcl-bin-$version.zip"
abclBinZipSha="$(curl -fsSL "$abclBinZipUrl" | sha256sum | cut -d' ' -f1)"
fi
for v in \
buster/{jdk-15,jdk-11,jdk-8} \
......@@ -30,6 +37,10 @@ for version in "${versions[@]}"; do
javaType="${javaVariant%-*}"
dir="$version/$v"
if [ "$version" = "nightly" ] && [[ "$os" == "windowsservercore"* ]]; then
continue
fi
mkdir -p "$dir"
case "$os" in
......@@ -44,15 +55,26 @@ for version in "${versions[@]}"; do
;;
esac
if [ "$version" = "nightly" ]; then
template="$template-nightly"
fi
tag="$javaVersion-$javaType-$os"
template="Dockerfile-${template}.template"
{ generated_warning; cat "$template"; } > "$dir/Dockerfile"
sed -ri \
-e 's/^(ENV ABCL_VERSION) .*/\1 '"$version"'/' \
-e 's/^(ENV ABCL_SHA256) .*/\1 '"$abclBinZipSha"'/' \
-e 's/^(FROM) .*/\1 '"openjdk:$tag"'/' \
"$dir/Dockerfile"
if [ "$version" = "nightly" ]; then
sed -ri \
-e 's/^(FROM) .*/\1 '"openjdk:$tag"'/' \
-e 's/^(ENV ABCL_COMMIT) .*/\1 '"$abclGitSha"'/' \
"$dir/Dockerfile"
else
sed -ri \
-e 's/^(ENV ABCL_VERSION) .*/\1 '"$version"'/' \
-e 's/^(ENV ABCL_SHA256) .*/\1 '"$abclBinZipSha"'/' \
-e 's/^(FROM) .*/\1 '"openjdk:$tag"'/' \
"$dir/Dockerfile"
fi
done
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment