diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 4055fcc289..972faae757 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -9,23 +9,32 @@ on: # yamllint disable-line rule:truthy jobs: build: - name: RHEL8 ${{ matrix.build-type }} build on Java ${{ matrix.java-version }} with compiler target ${{ matrix.java-compiler }} + name: RHEL8 standard build on Java 11 with compiler target 11 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build + run: | + docker compose -f contrib/docker/docker-compose.ci.yml up --exit-code-from emissary-ci + docker compose -f contrib/docker/docker-compose.ci.yml down + + matrix-build: + name: RHEL8 experimental build on Java ${{ matrix.java-version }} with compiler target ${{ matrix.java-compiler }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: java-compiler: ['11', '17'] java-version: ['17'] - experimental: [false] - build-type: ["experimental"] - verify-build: [false] - include: - - java-compiler: '11' - java-version: '11' - experimental: false - build-type: "standard" - verify-build: true - continue-on-error: ${{ matrix.experimental }} + continue-on-error: true steps: - name: Checkout @@ -46,7 +55,7 @@ jobs: build-args: | java_version=${{ matrix.java-version }} java_compiler=${{ matrix.java-compiler }} - verify_build=${{ matrix.verify-build }} + verify_build=false cache-from: type=gha cache-to: ${{ github.event_name == 'push' && 'type=gha,mode=max' || '' }} diff --git a/contrib/docker/Dockerfile.ci b/contrib/docker/Dockerfile.ci index bd68c9af1c..00e7140dd5 100644 --- a/contrib/docker/Dockerfile.ci +++ b/contrib/docker/Dockerfile.ci @@ -101,7 +101,7 @@ ARG maven_profiles='-Pdist' RUN --mount=type=cache,uid=${uid},gid=${gid},target=/home/${user}/.m2 \ mvn -V -B -e -ntp "-Dstyle.color=always" -Dmaven.compiler.release=${java_compiler} ${maven_phases} ${maven_profiles} -ARG verify_build=false +ARG verify_build=true RUN if ${verify_build} ; then ./contrib/ci/detect-changes.sh ; fi diff --git a/contrib/docker/docker-compose.ci.yml b/contrib/docker/docker-compose.ci.yml new file mode 100644 index 0000000000..ce52b3ffc6 --- /dev/null +++ b/contrib/docker/docker-compose.ci.yml @@ -0,0 +1,65 @@ +--- +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' + depends_on: + emissary-server: + condition: service_healthy + 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 + depends_on: + emissary-feeder: + condition: service_healthy + +volumes: + input: + output: