This is an automated email from the ASF dual-hosted git repository.

madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/master by this push:
     new 32e23040f ATLAS-4981: Interrupt CI if maven build inside the container 
fails (#283)
32e23040f is described below

commit 32e23040f3805a650324704d01f33ea3f581e067
Author: Abhishek Kumar <a...@apache.org>
AuthorDate: Mon Feb 10 10:42:52 2025 -0800

    ATLAS-4981: Interrupt CI if maven build inside the container fails (#283)
---
 .github/workflows/ci.yml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b33bbaae1..863500bed 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -70,6 +70,14 @@ jobs:
           export DOCKER_BUILDKIT=1
           export COMPOSE_DOCKER_CLI_BUILD=1
           SKIPTESTS=false docker compose -f docker-compose.atlas-base.yml -f 
docker-compose.atlas-build.yml up
+          ATLAS_BUILD_CONTAINER=$(docker ps -a -q --filter "name=atlas-build")
+          EXIT_CODE=$(docker inspect --format '{{.State.ExitCode}}' 
"$ATLAS_BUILD_CONTAINER")
+          
+          # If the exit code is non-zero, fail the workflow
+          if [ "$EXIT_CODE" -ne 0 ]; then
+            echo "atlas-build container failed with exit code $EXIT_CODE."
+            exit 1
+          fi
 
       - name: Cache downloaded archives
         if: success()

Reply via email to