Skip to content
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
80 changes: 80 additions & 0 deletions .github/workflows/ci-4.x-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI - 4.x-beta

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
docker-build:
runs-on: ubuntu-latest
strategy:
matrix:
versions:
- CONTEXT: .
TAGS:
- wiremock/wiremock:test
PLATFORMS:
- linux/amd64
- linux/arm64
- linux/arm/v7
- CONTEXT: alpine
TAGS:
- wiremock/wiremock:test-alpine
PLATFORMS:
- linux/amd64

steps:

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: all

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Checkout sources
uses: actions/checkout@main

# TODO: Re-enable if rate limit becomes an issues
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: wiremock
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build WireMock Docker image
uses: docker/build-push-action@v4
with:
context: ${{ matrix.versions.CONTEXT }}
platforms: ${{ join(matrix.versions.PLATFORMS, ',') }}
push: false
file: ${{ matrix.versions.CONTEXT }}/Dockerfile
tags: ${{ matrix.versions.TAGS[0] }}
build-args: |
WIREMOCK_VERSION=4.0.0-beta.29

- name: Build Wiremock Docker image
run: docker buildx build --tag ${{ matrix.versions.TAGS[0] }} --load ${{ matrix.versions.CONTEXT }} --file ${{ matrix.versions.CONTEXT }}/Dockerfile --build-arg JAVA_VERSION=17 --build-arg WIREMOCK_VERSION=4.0.0-beta.29

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: maven

- name: Run integration test
working-directory: test/integration-tests
run: mvn -B -ntp package verify --file pom.xml -DargLine="-Dit.wiremock-image=${{ matrix.versions.TAGS[0] }}"

container-image-scan:
uses: ./.github/workflows/container-image-scan.yml
needs: docker-build
with:
image_version: latest
secrets: inherit
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ jobs:
push: false
file: ${{ matrix.versions.CONTEXT }}/Dockerfile
tags: ${{ matrix.versions.TAGS[0] }}
build-args: |
WIREMOCK_VERSION=3.13.2

- name: Build Wiremock Docker image
run: docker buildx build --tag ${{ matrix.versions.TAGS[0] }} --load ${{ matrix.versions.CONTEXT }} --file ${{ matrix.versions.CONTEXT }}/Dockerfile
run: docker buildx build --tag ${{ matrix.versions.TAGS[0] }} --load ${{ matrix.versions.CONTEXT }} --file ${{ matrix.versions.CONTEXT }}/Dockerfile --build-arg JAVA_VERSION=17 --build-arg WIREMOCK_VERSION=3.13.2

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'temurin'
cache: maven

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'temurin'
cache: maven

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'temurin'
cache: maven

Expand Down
35 changes: 33 additions & 2 deletions .github/workflows/release-4.x-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,40 @@ jobs:
LATEST_VERSION=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/wiremock/wiremock.git '4.*.*' | tail -1 | cut -d '/' -f3)
echo "NEW_VERSION=${{ github.event.inputs.bundled-version }}-${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT

docker-build-push:
verify-container-startup:
runs-on: ubuntu-latest
needs: [check-new-version]
if: needs.check-new-version.outputs.new_version
steps:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Checkout sources
uses: actions/checkout@main

- name: Build WireMock Docker image (local)
run: |
docker buildx build \
--tag wiremock/wiremock:verify \
--load \
--build-arg "WIREMOCK_VERSION=${{ github.event.inputs.bundled-version }}" \
--build-arg "JAVA_VERSION=17" \
--file Dockerfile \
.

- name: Verify container startup
run: |
docker run -d --name wiremock-test -p 8080:8080 wiremock/wiremock:verify
timeout 30 bash -c 'until curl -sf http://localhost:8080/__admin/health; do sleep 1; done'
echo "WireMock container started and health check passed"
docker stop wiremock-test
docker rm wiremock-test

docker-build-push:
runs-on: ubuntu-latest
needs: [check-new-version, verify-container-startup]
if: needs.check-new-version.outputs.new_version
strategy:
matrix:
versions:
Expand Down Expand Up @@ -96,7 +126,8 @@ jobs:
push: true
tags: ${{ join(matrix.versions.IMAGES, ',') }}
build-args: |
"WIREMOCK_VERSION=${{ github.event.inputs.bundled-version }}"
WIREMOCK_VERSION=${{ github.event.inputs.bundled-version }}
JAVA_VERSION=17

container-image-scan:
uses: ./.github/workflows/container-image-scan.yml
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ jobs:
push: true
tags: ${{ join(matrix.versions.IMAGES, ',') }}
build-args: |
"WIREMOCK_VERSION=${{ github.event.inputs.bundled-version }}"
WIREMOCK_VERSION=${{ github.event.inputs.bundled-version }}
JAVA_VERSION=17

container-image-scan:
uses: ./.github/workflows/container-image-scan.yml
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

test/integration-tests/target
test/integration-tests/integration-tests.iml

.claude
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM eclipse-temurin:11.0.24_8-jre
ARG JAVA_VERSION=17
FROM eclipse-temurin:${JAVA_VERSION}-jre

LABEL maintainer="Rodolphe CHAIGNEAU <rodolphe.chaigneau@gmail.com>"

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-nightly
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILD

FROM gradle:7-jdk11 AS builder
FROM gradle:8-jdk17 AS builder

WORKDIR /workdir

Expand All @@ -12,7 +12,7 @@ RUN ./gradlew shadowJar

# RUN

FROM eclipse-temurin:11.0.24_8-jre
FROM eclipse-temurin:17-jre

LABEL maintainer="Rodolphe CHAIGNEAU <rodolphe.chaigneau@gmail.com>"

Expand Down
3 changes: 2 additions & 1 deletion alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM eclipse-temurin:11-jre-alpine
ARG JAVA_VERSION=17
FROM eclipse-temurin:${JAVA_VERSION}-jre-alpine

LABEL maintainer="Rodolphe CHAIGNEAU <rodolphe.chaigneau@gmail.com>"

Expand Down
4 changes: 2 additions & 2 deletions alpine/Dockerfile-nightly
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILD

FROM gradle:7-jdk11 AS builder
FROM gradle:8-jdk17 AS builder

WORKDIR /workdir

Expand All @@ -10,7 +10,7 @@ RUN ./gradlew shadowJar

# RUN

FROM eclipse-temurin:11.0.20_8-jre-alpine
FROM eclipse-temurin:17-jre-alpine

LABEL maintainer="Rodolphe CHAIGNEAU <rodolphe.chaigneau@gmail.com>"

Expand Down
2 changes: 1 addition & 1 deletion test/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</licenses>

<properties>
<java.version>11</java.version>
<java.version>17</java.version>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
<wiremock-testcontainers.version>1.0-alpha-13</wiremock-testcontainers.version>
Expand Down
Loading