diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 4055fcc289..4dfbbc4b5b 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -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 }} @@ -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 diff --git a/contrib/docker/docker-compose.ci.centos7.yml b/contrib/docker/docker-compose.ci.centos7.yml new file mode 100644 index 0000000000..99e7e4b7d0 --- /dev/null +++ b/contrib/docker/docker-compose.ci.centos7.yml @@ -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: diff --git a/contrib/docker/docker-compose.ci.common.yml b/contrib/docker/docker-compose.ci.common.yml new file mode 100644 index 0000000000..03490dc784 --- /dev/null +++ b/contrib/docker/docker-compose.ci.common.yml @@ -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: