Skip to content

Commit

Permalink
Merge pull request #105 from groovy/replace-legacy-style
Browse files Browse the repository at this point in the history
Replace legacy style env vars
  • Loading branch information
keeganwitt authored Sep 27, 2024
2 parents 66d9d80 + e8413f8 commit db410b3
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
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

0 comments on commit db410b3

Please sign in to comment.