Skip to content
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

Replace legacy style env vars #105

Merged
merged 1 commit into from
Sep 27, 2024
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
4 changes: 2 additions & 2 deletions jdk11-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM eclipse-temurin:11-jdk-alpine

CMD ["groovysh"]

ENV GROOVY_HOME /opt/groovy
ENV GROOVY_HOME=/opt/groovy

RUN set -o errexit -o nounset \
&& echo "Adding groovy user and group" \
Expand All @@ -19,7 +19,7 @@ VOLUME /home/groovy/.groovy/grapes

WORKDIR /home/groovy

ENV GROOVY_VERSION 4.0.22
ENV GROOVY_VERSION=4.0.22
RUN set -o errexit -o nounset \
&& echo "Installing build dependencies" \
&& apk add --no-cache --virtual .build-deps \
Expand Down
4 changes: 2 additions & 2 deletions jdk11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM eclipse-temurin:11-jdk-jammy

CMD ["groovysh"]

ENV GROOVY_HOME /opt/groovy
ENV GROOVY_HOME=/opt/groovy

RUN set -o errexit -o nounset \
&& echo "Adding groovy user and group" \
Expand All @@ -29,7 +29,7 @@ RUN set -o errexit -o nounset \
wget \
&& rm --recursive --force /var/lib/apt/lists/*

ENV GROOVY_VERSION 4.0.22
ENV GROOVY_VERSION=4.0.22
RUN set -o errexit -o nounset \
&& echo "Downloading Groovy" \
&& wget --no-verbose --output-document=groovy.zip "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip" \
Expand Down
4 changes: 2 additions & 2 deletions jdk17-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM eclipse-temurin:17-jdk-alpine

CMD ["groovysh"]

ENV GROOVY_HOME /opt/groovy
ENV GROOVY_HOME=/opt/groovy

RUN set -o errexit -o nounset \
&& echo "Adding groovy user and group" \
Expand All @@ -19,7 +19,7 @@ VOLUME /home/groovy/.groovy/grapes

WORKDIR /home/groovy

ENV GROOVY_VERSION 4.0.22
ENV GROOVY_VERSION=4.0.22
RUN set -o errexit -o nounset \
&& echo "Installing build dependencies" \
&& apk add --no-cache --virtual .build-deps \
Expand Down
4 changes: 2 additions & 2 deletions jdk17/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM eclipse-temurin:17-jdk-jammy

CMD ["groovysh"]

ENV GROOVY_HOME /opt/groovy
ENV GROOVY_HOME=/opt/groovy

RUN set -o errexit -o nounset \
&& echo "Adding groovy user and group" \
Expand All @@ -29,7 +29,7 @@ RUN set -o errexit -o nounset \
wget \
&& rm --recursive --force /var/lib/apt/lists/*

ENV GROOVY_VERSION 4.0.22
ENV GROOVY_VERSION=4.0.22
RUN set -o errexit -o nounset \
&& echo "Downloading Groovy" \
&& wget --no-verbose --output-document=groovy.zip "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip" \
Expand Down
4 changes: 2 additions & 2 deletions jdk21-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM eclipse-temurin:21-jdk-alpine

CMD ["groovysh"]

ENV GROOVY_HOME /opt/groovy
ENV GROOVY_HOME=/opt/groovy

RUN set -o errexit -o nounset \
&& echo "Adding groovy user and group" \
Expand All @@ -19,7 +19,7 @@ VOLUME /home/groovy/.groovy/grapes

WORKDIR /home/groovy

ENV GROOVY_VERSION 4.0.22
ENV GROOVY_VERSION=4.0.22
RUN set -o errexit -o nounset \
&& echo "Installing build dependencies" \
&& apk add --no-cache --virtual .build-deps \
Expand Down
4 changes: 2 additions & 2 deletions jdk21/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM eclipse-temurin:21-jdk-jammy

CMD ["groovysh"]

ENV GROOVY_HOME /opt/groovy
ENV GROOVY_HOME=/opt/groovy

RUN set -o errexit -o nounset \
&& echo "Adding groovy user and group" \
Expand All @@ -29,7 +29,7 @@ RUN set -o errexit -o nounset \
wget \
&& rm --recursive --force /var/lib/apt/lists/*

ENV GROOVY_VERSION 4.0.22
ENV GROOVY_VERSION=4.0.22
RUN set -o errexit -o nounset \
&& echo "Downloading Groovy" \
&& wget --no-verbose --output-document=groovy.zip "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip" \
Expand Down
4 changes: 2 additions & 2 deletions jdk8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM eclipse-temurin:8-jdk-jammy

CMD ["groovysh"]

ENV GROOVY_HOME /opt/groovy
ENV GROOVY_HOME=/opt/groovy

RUN set -o errexit -o nounset \
&& echo "Adding groovy user and group" \
Expand All @@ -29,7 +29,7 @@ RUN set -o errexit -o nounset \
wget \
&& rm --recursive --force /var/lib/apt/lists/*

ENV GROOVY_VERSION 4.0.22
ENV GROOVY_VERSION=4.0.22
RUN set -o errexit -o nounset \
&& echo "Downloading Groovy" \
&& wget --no-verbose --output-document=groovy.zip "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip" \
Expand Down
2 changes: 1 addition & 1 deletion update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ $groovyVersion = $(((Invoke-WebRequest "https://api.github.com/repos/apache/groo
Write-Host "Updating to Groovy $groovyVersion"

dir -Recurse -Filter Dockerfile | ForEach-Object {
(Get-Content -Path $_.FullName) -replace "ENV GROOVY_VERSION .+", "ENV GROOVY_VERSION ${groovyVersion}" | Set-Content $_.FullName
(Get-Content -Path $_.FullName) -replace "ENV GROOVY_VERSION=.+", "ENV GROOVY_VERSION=${groovyVersion}" | Set-Content $_.FullName
}
(Get-Content -Path .github/workflows/ci.yaml) -replace "expectedGroovyVersion: .+", "expectedGroovyVersion: ${groovyVersion}" | Set-Content .github/workflows/ci.yaml
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -o errexit -o nounset -o pipefail
groovyVersion=$(curl -s 'https://api.github.com/repos/apache/groovy/tags' | grep -Eo 'GROOVY_4.[0-9]{1,2}.[0-9]{1,2}' | head -n 1 | sed -e 's/GROOVY_//' -e 's/_/./g')
echo "Updating to Groovy $groovyVersion"

sed --regexp-extended --in-place "s/ENV GROOVY_VERSION .+/ENV GROOVY_VERSION ${groovyVersion}/" ./*/Dockerfile
sed --regexp-extended --in-place "s/ENV GROOVY_VERSION=.+/ENV GROOVY_VERSION=${groovyVersion}/" ./*/Dockerfile
sed --regexp-extended --in-place "s/expectedGroovyVersion: .+$/expectedGroovyVersion: ${groovyVersion}/" .github/workflows/ci.yaml
Loading