diff --git a/scripts/docker/wiremock/Dockerfile b/scripts/docker/wiremock/Dockerfile index 392bd5b..0010cdb 100644 --- a/scripts/docker/wiremock/Dockerfile +++ b/scripts/docker/wiremock/Dockerfile @@ -1,9 +1,9 @@ -FROM docker.io/openjdk:11-jre-slim +FROM docker.io/eclipse-temurin:21-jre-ubi9-minimal -ARG WM_VERSION=2.32.0 +ARG WM_VERSION=3.6.0 -RUN apt-get update && apt-get -y install curl && mkdir -p /wiremock/mappings && cd /wiremock && \ - curl -sSL -o wiremock.jar https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/$WM_VERSION/wiremock-jre8-standalone-$WM_VERSION.jar +RUN mkdir -p /wiremock/mappings && cd /wiremock && \ + curl -sSL -o wiremock.jar https://repo1.maven.org/maven2/org/wiremock/wiremock-standalone/$WM_VERSION/wiremock-standalone-$WM_VERSION.jar WORKDIR /wiremock diff --git a/scripts/provision_wiremock.rb b/scripts/provision_wiremock.rb index 33dd041..8528d52 100644 --- a/scripts/provision_wiremock.rb +++ b/scripts/provision_wiremock.rb @@ -57,11 +57,13 @@ def build_wiremock(root_loc, appname, already_started, new_container) ' | docker cp - wiremock:/wiremock/mappings/') end - # Rename the file so it is unique and wont get overwritten by any others we copy up - # Also, GitBash needs the inner quotes to be doubles - run_command('docker exec wiremock bash -c "' \ - "mv /wiremock/mappings/wiremock-fragment.json /wiremock/mappings/#{appname}-wiremock-fragment.json" \ - '"') + if wiremock_file + # Rename the file so it is unique and wont get overwritten by any others we copy up + # Also, GitBash needs the inner quotes to be doubles + run_command('docker exec wiremock bash -c "' \ + "mv /wiremock/mappings/wiremock-fragment.json /wiremock/mappings/#{appname}-wiremock-fragment.json" \ + '"') + end # Update the .commodities.yml to indicate that Wiremock has now been provisioned set_commodity_provision_status(root_loc, appname, 'wiremock', true)