Skip to content

Commit 190f1af

Browse files
ci: patch applied to publish test service (WPB-8645) (#3765)
* ci: patch applied to publish testserivce * Update tools/testservice/Dockerfile Co-authored-by: Mark Brockhoff <95471369+markbrockhoff@users.noreply.github.com> * Update .github/workflows/publish-testservice.yml Co-authored-by: Mark Brockhoff <95471369+markbrockhoff@users.noreply.github.com> * Change branch trigger from 'main' to 'develop' --------- Co-authored-by: Mark Brockhoff <95471369+markbrockhoff@users.noreply.github.com>
1 parent 824eee1 commit 190f1af

3 files changed

Lines changed: 49 additions & 4 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and publish image of Testservice to quay.io
2+
3+
on:
4+
push:
5+
branches: ["develop"]
6+
7+
jobs:
8+
quay_publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v5
13+
14+
- name: Set up QEMU
15+
uses: docker/setup-qemu-action@v3
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
20+
- name: Login to Quay
21+
uses: docker/login-action@v3
22+
with:
23+
registry: quay.io
24+
username: wire+testservice_kalium_bot
25+
password: ${{ secrets.QUAY_TESTSERVICE_PASSWORD }}
26+
27+
- name: Build and push
28+
uses: docker/build-push-action@v5
29+
with:
30+
context: .
31+
file: ./tools/testservice/Dockerfile
32+
platforms: linux/amd64
33+
tags: quay.io/wire/testservice:latest
34+
push: true

tools/testservice/Dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 eclipse-temurin:17-jdk
1+
FROM eclipse-temurin:17-jdk
22

33
# disable prompts from the txdata
44
ENV DEBIAN_FRONTEND=noninteractive
@@ -17,5 +17,16 @@ WORKDIR /app
1717

1818
COPY . .
1919

20-
RUN ./gradlew clean
2120
RUN ./gradlew :tools:testservice:shadowJar
21+
22+
FROM eclipse-temurin:17-jdk
23+
24+
WORKDIR /app
25+
26+
COPY --from=0 /app/tools/testservice/build/libs/ /app/testservice/
27+
COPY --from=0 /app/tools/testservice/config.yml /app/testservice/config.yml
28+
29+
RUN useradd -m appuser
30+
RUN chown -R appuser:appuser /app
31+
32+
CMD ["java", "-jar", "/app/testservice/testservice-0.0.1-SNAPSHOT-all.jar", "server", "/app/testservice/config.yml"]

tools/testservice/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ java -jar tools/testservice/build/libs/testservice-*-all.jar server testservice/
2525
## Installation
2626

2727
Build inside container:
28+
2829
```shell
2930
docker build --platform linux/arm64 -t testservice_build_env -f tools/testservice/Dockerfile .
3031
docker create --name temp_container testservice_build_env
31-
docker cp temp_container:/app/testservice/build/libs/testservice-0.0.1-SNAPSHOT-all.jar ./testservice/testservice-0.0.1-SNAPSHOT-all.jar
32-
(optional) docker cp temp_container:/app/native/libs ./native/
32+
docker cp temp_container:/app/testservice/testservice-0.0.1-SNAPSHOT-all.jar ./testservice/testservice-0.0.1-SNAPSHOT-all.jar
3333
docker rm temp_container
3434
```
3535

0 commit comments

Comments
 (0)