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

Updates to Wiremock - only rename file that exists, and update Wiremo… #156

Merged
merged 1 commit into from
Jun 13, 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
8 changes: 4 additions & 4 deletions scripts/docker/wiremock/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 7 additions & 5 deletions scripts/provision_wiremock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down