Skip to content

Commit

Permalink
test compose ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-mlb committed Jun 18, 2024
1 parent 438e109 commit 229a853
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/maven-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
context: .
push: false
file: contrib/docker/Dockerfile.ci
tags: emissary:latest
build-args: |
java_version=${{ matrix.java-version }}
java_compiler=${{ matrix.java-compiler }}
Expand All @@ -69,12 +70,18 @@ jobs:
context: .
push: false
file: contrib/docker/Dockerfile.ci
tags: emissary-server:latest , emissary-feeder:latest
build-args: |
target_os=centos7
verify_build=false
cache-from: type=gha
cache-to: ${{ github.event_name == 'push' && 'type=gha,mode=max' || '' }}

- name: Test
run: |
docker compose -f contrib/docker/docker-compose.ci.centos7.yml up --exit-code-from emissary-ci
docker compose -f contrib/docker/docker-compose.ci.centos7.yml down
macos-build:
name: MacOS non-standard build on Java 11 with compiler target 11
runs-on: macos-14
Expand Down
44 changes: 44 additions & 0 deletions contrib/docker/docker-compose.ci.centos7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
services:
emissary-server:
image: emissary
extends:
file: docker-compose.ci.common.yml
service: emissary-server
build:
args:
java_version: 11
java_compiler: 11
target_os: centos7
verify_build: false
maven_phases: 'clean package'
maven_profiles: '-DskipTests -Pdist'

emissary-feeder:
image: emissary
extends:
file: docker-compose.ci.common.yml
service: emissary-feeder
build:
args:
java_version: 11
java_compiler: 11
target_os: centos7
verify_build: false
maven_phases: 'clean package'
maven_profiles: '-DskipTests -Pdist'
depends_on:
emissary-server:
condition: service_healthy

emissary-ci:
extends:
file: docker-compose.ci.common.yml
service: emissary-ci
depends_on:
emissary-feeder:
condition: service_healthy

volumes:
input:
output:
59 changes: 59 additions & 0 deletions contrib/docker/docker-compose.ci.common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
services:
emissary-server:
image: emissary
build:
context: ../../
dockerfile: contrib/docker/Dockerfile.ci
environment:
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000 -Dfile.encoding=UTF8
network_mode: host
command: "server -a 5 -p 8001 -m cluster -s http"
ports:
- "8000:8000"
- "8001:8001"
expose:
- '8000'
- '8001'
volumes:
- input:/opt/emissary/target/data
- output:/opt/emissary/localoutput
healthcheck:
test: curl --fail http://localhost:8001/api/health || exit 1
start_period: 10s
interval: 10s
timeout: 20s
retries: 3

emissary-feeder:
image: emissary
build:
context: ../../
dockerfile: contrib/docker/Dockerfile.ci
environment:
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:7000 -Dfile.encoding=UTF8
network_mode: host
command: "feed -p 7001 -i /opt/emissary/target/data/InputData --eatPrefix /opt/emissary/target/data/InputData"
ports:
- "7000:7000"
- "7001:7001"
expose:
- '7000'
- '7001'
volumes:
- input:/opt/emissary/target/data
healthcheck:
test: curl --fail http://localhost:7001/api/health || exit 1
start_period: 10s
interval: 10s
timeout: 20s
retries: 3

emissary-ci:
image: redhat/ubi8:8.9
network_mode: host
command: curl --fail http://localhost:7001/api/health || exit 1

volumes:
input:
output:

0 comments on commit 229a853

Please sign in to comment.