Skip to content

Commit

Permalink
Merge pull request #9 from Rbillon59/chore/support-arm64
Browse files Browse the repository at this point in the history
chore: Bump openjdk to be compatible with arm64 platform
  • Loading branch information
Rbillon59 authored May 31, 2023
2 parents 93823e3 + 4f59117 commit 118a4ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set matrix for build
id: set-matrix
run: |
RELEASES=$(curl -s -H "Accept: application/vnd.github.v3+json" -X GET "https://api.github.com/repos/wiremock/wiremock/tags?per_page=10" | jq --compact-output '[ .[] | select(.name|match("[0-9].[0-9]+.[0-9]$")) | .name ]')
RELEASES=$(curl -s -H "Accept: application/vnd.github.v3+json" -X GET "https://api.github.com/repos/wiremock/wiremock/tags?per_page=20" | jq --compact-output '[ .[] | select(.name|match("[0-9].[0-9]+.[0-9]$")) | .name ]')
echo "::set-output name=matrix::$RELEASES"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Set latest release for build
id: set-latest-release
run: |
RELEASES=$(curl -s -H "Accept: application/vnd.github.v3+json" -X GET "https://api.github.com/repos/wiremock/wiremock/tags?per_page=10" | jq --compact-output '[ .[] | select(.name|match("[0-9].[0-9]+.[0-9]$")) | .name ]')
RELEASES=$(curl -s -H "Accept: application/vnd.github.v3+json" -X GET "https://api.github.com/repos/wiremock/wiremock/tags?per_page=20" | jq --compact-output '[ .[] | select(.name|match("[0-9].[0-9]+.[0-9]$")) | .name ]')
RELEASE=$(echo ${RELEASES} | jq -r --slurp '.[0][0]')
echo "::set-output name=release::$RELEASE"
outputs:
Expand Down Expand Up @@ -65,6 +65,7 @@ jobs:
push: true
tags: rbillon59/wiremock-loadtest:${{ matrix.releases }}
build-args: WIREMOCK_VERSION=${{ matrix.releases }}
platforms: linux/amd64,linux/arm64

build-n-push-latest:
needs: get-latest-release
Expand Down Expand Up @@ -94,4 +95,5 @@ jobs:
context: ./docker
push: true
tags: rbillon59/wiremock-loadtest:latest
build-args: WIREMOCK_VERSION=${{ needs.get-latest-release.outputs.release }}
build-args: WIREMOCK_VERSION=${{ needs.get-latest-release.outputs.release }}
platforms: linux/amd64,linux/arm64
6 changes: 5 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM openjdk:15-alpine
FROM openjdk:21-slim

ARG WIREMOCK_VERSION 2.27.2

RUN apt update && \
apt install -y wget && \
rm -rf /var/lib/apt/lists/*

RUN mkdir -p /var/wiremock/lib/ && \
wget https://search.maven.org/remotecontent?filepath=com/github/tomakehurst/wiremock-jre8-standalone/${WIREMOCK_VERSION}/wiremock-jre8-standalone-${WIREMOCK_VERSION}.jar \
-O /var/wiremock/lib/wiremock-jre8-standalone.jar && \
Expand Down

0 comments on commit 118a4ec

Please sign in to comment.