Skip to content

Commit

Permalink
Merge pull request #329 from gounthar/updatecli-for-jdk21
Browse files Browse the repository at this point in the history
chore(dependencies): Tracks JAVA_VERSION in Dockerfiles too.
  • Loading branch information
dduportal authored Oct 3, 2023
2 parents 5277291 + faa637c commit 70f81cf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
4 changes: 1 addition & 3 deletions alpine/21/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

ARG JAVA_VERSION=21+35
ARG ALPINE_TAG=3.18.3
FROM alpine:"${ALPINE_TAG}" AS jre-build
ARG JAVA_VERSION
ARG JAVA_VERSION=21+35

RUN apk add --no-cache curl jq \
&& ARCH=$(uname -m | sed 's/x86_64/x64/') \
Expand Down
3 changes: 1 addition & 2 deletions debian/21/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ARG JAVA_VERSION=21+35
ARG DEBIAN_RELEASE=bookworm-20230904
FROM debian:"${DEBIAN_RELEASE}" AS jre-build
ARG JAVA_VERSION
ARG JAVA_VERSION=21+35
# This Build ARG is populated by Docker
# Ref. https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
ARG TARGETPLATFORM
Expand Down
19 changes: 17 additions & 2 deletions updatecli/updatecli.d/jdk21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,29 @@ conditions:
command: bash ./updatecli/scripts/check-jdk.sh # source input value passed as argument

targets:
setJDK21Version:
setJDK21VersionForBake:
name: "Bump JDK21 version for Linux images in the docker-bake.hcl file"
kind: hcl
spec:
file: docker-bake.hcl
path: variable.JAVA21_VERSION.default
scmid: default

setJDK21VersionAlpine:
name: "Bump JDK21 version for Linux images in the Alpine Linux Dockerfile"
kind: dockerfile
spec:
file: alpine/21/Dockerfile
instruction:
keyword: "ARG"
matcher: "JAVA_VERSION"
setJDK21VersionDebian:
name: "Bump JDK21 version for Linux images in the Debian Dockerfile"
kind: dockerfile
spec:
file: debian/21/Dockerfile
instruction:
keyword: "ARG"
matcher: "JAVA_VERSION"
actions:
default:
kind: github/pullrequest
Expand Down

0 comments on commit 70f81cf

Please sign in to comment.