From 3b658c9b17149b813e0e17e870ed7ae896099d09 Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:08:09 -0400 Subject: [PATCH 01/12] Add a step to build base image locally --- .github/workflows/container_integration_tests.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container_integration_tests.yml b/.github/workflows/container_integration_tests.yml index 8396c714135..70f63af088e 100644 --- a/.github/workflows/container_integration_tests.yml +++ b/.github/workflows/container_integration_tests.yml @@ -69,7 +69,16 @@ jobs: run: | set -euo pipefail mvn -version - + + # --------------------------- + # 1. BUILD THE BASE IMAGE FIRST + # --------------------------- + - name: Build local base image + run: | + set -euo pipefail + echo "Building the base image module so it is cached locally..." + mvn -Pct clean package -pl modules/container-base + # --------------------------- # BUILD IMAGES (Dataverse-native) # --------------------------- @@ -282,4 +291,4 @@ jobs: with: name: docker-logs path: docker-logs/ - retention-days: 14 \ No newline at end of file + retention-days: 14 From 033280066a476aa53ba88580120a2368b4026556 Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:10:54 -0400 Subject: [PATCH 02/12] Specify pom.xml in Maven build command Updated Maven command to specify pom.xml for building the base image. --- .github/workflows/container_integration_tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/container_integration_tests.yml b/.github/workflows/container_integration_tests.yml index 70f63af088e..1fcfad7fe05 100644 --- a/.github/workflows/container_integration_tests.yml +++ b/.github/workflows/container_integration_tests.yml @@ -77,7 +77,8 @@ jobs: run: | set -euo pipefail echo "Building the base image module so it is cached locally..." - mvn -Pct clean package -pl modules/container-base + # Use -f to point directly to the module's pom.xml + mvn -Pct clean package -f modules/container-base/pom.xml # --------------------------- # BUILD IMAGES (Dataverse-native) From c3ddcba6b408056aaa948d5a431bcdd169f09cde Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:31:24 -0400 Subject: [PATCH 03/12] Update comment formatting in CI workflow file --- .github/workflows/container_integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container_integration_tests.yml b/.github/workflows/container_integration_tests.yml index 1fcfad7fe05..f35d777546b 100644 --- a/.github/workflows/container_integration_tests.yml +++ b/.github/workflows/container_integration_tests.yml @@ -71,7 +71,7 @@ jobs: mvn -version # --------------------------- - # 1. BUILD THE BASE IMAGE FIRST + # BUILD THE BASE IMAGE FIRST # --------------------------- - name: Build local base image run: | From b326bf4af9619e780613d9d0cacf6c1ef9a30541 Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:31:52 -0400 Subject: [PATCH 04/12] Add local base image build step to workflow Added step to build local base image for caching. --- .github/workflows/dataverse_jsf_tests.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/dataverse_jsf_tests.yml b/.github/workflows/dataverse_jsf_tests.yml index da4b32bf4d2..257714621ab 100644 --- a/.github/workflows/dataverse_jsf_tests.yml +++ b/.github/workflows/dataverse_jsf_tests.yml @@ -67,6 +67,16 @@ jobs: set -euo pipefail mvn -version + # --------------------------- + # BUILD THE BASE IMAGE FIRST + # --------------------------- + - name: Build local base image + run: | + set -euo pipefail + echo "Building the base image module so it is cached locally..." + # Use -f to point directly to the module's pom.xml + mvn -Pct clean package -f modules/container-base/pom.xml + # --------------------------- # BUILD IMAGES (Dataverse-native) # --------------------------- From 231f1c9e3eb356fce8f2482abc59557a8dcfc3ae Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:46:15 -0400 Subject: [PATCH 05/12] Modify base image handling in integration tests workflow Updated the workflow to fetch or build the base image based on its availability in the registry. --- .../workflows/container_integration_tests.yml | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/container_integration_tests.yml b/.github/workflows/container_integration_tests.yml index f35d777546b..85e7a8ec49b 100644 --- a/.github/workflows/container_integration_tests.yml +++ b/.github/workflows/container_integration_tests.yml @@ -71,14 +71,27 @@ jobs: mvn -version # --------------------------- - # BUILD THE BASE IMAGE FIRST + # FETCH OR BUILD BASE IMAGE # --------------------------- - - name: Build local base image + - name: Fetch or Build local base image run: | set -euo pipefail - echo "Building the base image module so it is cached locally..." - # Use -f to point directly to the module's pom.xml - mvn -Pct clean package -f modules/container-base/pom.xml + + # 1. Ask Maven what base image tag the main app expects + # (Note: if the property in pom.xml is named something else, change 'base.image' below) + BASE_IMAGE=$(mvn help:evaluate -Dexpression=base.image -q -DforceStdout) + echo "Target base image: $BASE_IMAGE" + + # 2. Try to pull the image from the registry + echo "Pinging registry for $BASE_IMAGE..." + + # Because this is in an 'if' statement, 'set -e' won't crash the script if the pull fails + if docker pull "$BASE_IMAGE"; then + echo "✅ Image found and pulled successfully! Skipping local build." + else + echo "⚠️ Image not found remotely. Building it locally from modules/container-base..." + mvn -Pct clean package -f modules/container-base/pom.xml + fi # --------------------------- # BUILD IMAGES (Dataverse-native) From db52f055362dbf8095a8274aa920a0e6a5a49dcc Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:46:46 -0400 Subject: [PATCH 06/12] Modify workflow to fetch or build base image Updated workflow to fetch or build the base image based on availability in the registry. --- .github/workflows/dataverse_jsf_tests.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dataverse_jsf_tests.yml b/.github/workflows/dataverse_jsf_tests.yml index 257714621ab..45626aed3fa 100644 --- a/.github/workflows/dataverse_jsf_tests.yml +++ b/.github/workflows/dataverse_jsf_tests.yml @@ -68,14 +68,27 @@ jobs: mvn -version # --------------------------- - # BUILD THE BASE IMAGE FIRST + # FETCH OR BUILD BASE IMAGE # --------------------------- - - name: Build local base image + - name: Fetch or Build local base image run: | set -euo pipefail - echo "Building the base image module so it is cached locally..." - # Use -f to point directly to the module's pom.xml - mvn -Pct clean package -f modules/container-base/pom.xml + + # 1. Ask Maven what base image tag the main app expects + # (Note: if the property in pom.xml is named something else, change 'base.image' below) + BASE_IMAGE=$(mvn help:evaluate -Dexpression=base.image -q -DforceStdout) + echo "Target base image: $BASE_IMAGE" + + # 2. Try to pull the image from the registry + echo "Pinging registry for $BASE_IMAGE..." + + # Because this is in an 'if' statement, 'set -e' won't crash the script if the pull fails + if docker pull "$BASE_IMAGE"; then + echo "✅ Image found and pulled successfully! Skipping local build." + else + echo "⚠️ Image not found remotely. Building it locally from modules/container-base..." + mvn -Pct clean package -f modules/container-base/pom.xml + fi # --------------------------- # BUILD IMAGES (Dataverse-native) From e7c57883240834d0a37bf3834915777bba540aa5 Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:50:17 -0400 Subject: [PATCH 07/12] Modify container integration test workflow for base image Updated the workflow to change the directory before evaluating the base image and added safety checks for image evaluation. --- .../workflows/container_integration_tests.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/container_integration_tests.yml b/.github/workflows/container_integration_tests.yml index 85e7a8ec49b..e7da9c0d7b2 100644 --- a/.github/workflows/container_integration_tests.yml +++ b/.github/workflows/container_integration_tests.yml @@ -77,15 +77,23 @@ jobs: run: | set -euo pipefail - # 1. Ask Maven what base image tag the main app expects - # (Note: if the property in pom.xml is named something else, change 'base.image' below) - BASE_IMAGE=$(mvn help:evaluate -Dexpression=base.image -q -DforceStdout) + # 1. cd into the module so Maven resolves the parent POM variables perfectly + cd modules/container-base + BASE_IMAGE=$(mvn help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) + cd ../.. + echo "Target base image: $BASE_IMAGE" - # 2. Try to pull the image from the registry + # 2. Safety catch: If Maven still fails to evaluate it, build locally and move on + if [[ "$BASE_IMAGE" == *"null object"* || -z "$BASE_IMAGE" ]]; then + echo "⚠️ Could not evaluate the image tag cleanly. Building locally to be safe..." + mvn -Pct clean package -f modules/container-base/pom.xml + exit 0 + fi + + # 3. Try to pull the image from the registry echo "Pinging registry for $BASE_IMAGE..." - # Because this is in an 'if' statement, 'set -e' won't crash the script if the pull fails if docker pull "$BASE_IMAGE"; then echo "✅ Image found and pulled successfully! Skipping local build." else From 1e00d2df3208100b99d331375a73cc807b12b208 Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:52:12 -0400 Subject: [PATCH 08/12] Fix comments and improve BASE_IMAGE evaluation --- .github/workflows/container_integration_tests.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/container_integration_tests.yml b/.github/workflows/container_integration_tests.yml index e7da9c0d7b2..7d5b32b135b 100644 --- a/.github/workflows/container_integration_tests.yml +++ b/.github/workflows/container_integration_tests.yml @@ -77,15 +77,17 @@ jobs: run: | set -euo pipefail - # 1. cd into the module so Maven resolves the parent POM variables perfectly + # 1. cd into the module so Maven resolves the parent POM perfectly cd modules/container-base - BASE_IMAGE=$(mvn help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) + + # We add the 'validate' phase so Maven calculates the ${parsedVersion...} variables first + BASE_IMAGE=$(mvn validate help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) cd ../.. echo "Target base image: $BASE_IMAGE" - # 2. Safety catch: If Maven still fails to evaluate it, build locally and move on - if [[ "$BASE_IMAGE" == *"null object"* || -z "$BASE_IMAGE" ]]; then + # 2. Safety catch: If it still has unresolved variables or is null, fallback to build + if [[ "$BASE_IMAGE" == *"null object"* || "$BASE_IMAGE" == *"\${"* || -z "$BASE_IMAGE" ]]; then echo "⚠️ Could not evaluate the image tag cleanly. Building locally to be safe..." mvn -Pct clean package -f modules/container-base/pom.xml exit 0 From 8b91a924cc8a7bb54b5683e02c8f2c9961827123 Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:54:30 -0400 Subject: [PATCH 09/12] Update container_integration_tests.yml --- .github/workflows/container_integration_tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/container_integration_tests.yml b/.github/workflows/container_integration_tests.yml index 7d5b32b135b..4942d78c251 100644 --- a/.github/workflows/container_integration_tests.yml +++ b/.github/workflows/container_integration_tests.yml @@ -77,11 +77,10 @@ jobs: run: | set -euo pipefail - # 1. cd into the module so Maven resolves the parent POM perfectly cd modules/container-base - # We add the 'validate' phase so Maven calculates the ${parsedVersion...} variables first - BASE_IMAGE=$(mvn validate help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) + # Explicitly run the parse-version goal so the ${parsedVersion...} variables exist in memory + BASE_IMAGE=$(mvn build-helper:parse-version help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) cd ../.. echo "Target base image: $BASE_IMAGE" From 493f9ff378d8768d925a31f4fde4e9a52de3e218 Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 16:57:35 -0400 Subject: [PATCH 10/12] Improve base image fetching logic in CI workflow Updated the process for fetching or building the local base image in the CI workflow. Added a safety check for unresolved variables and modified the Maven command to ensure proper evaluation of the base image tag. --- .github/workflows/dataverse_jsf_tests.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dataverse_jsf_tests.yml b/.github/workflows/dataverse_jsf_tests.yml index 45626aed3fa..691290b948e 100644 --- a/.github/workflows/dataverse_jsf_tests.yml +++ b/.github/workflows/dataverse_jsf_tests.yml @@ -74,15 +74,24 @@ jobs: run: | set -euo pipefail - # 1. Ask Maven what base image tag the main app expects - # (Note: if the property in pom.xml is named something else, change 'base.image' below) - BASE_IMAGE=$(mvn help:evaluate -Dexpression=base.image -q -DforceStdout) + cd modules/container-base + + # Explicitly run the parse-version goal so the ${parsedVersion...} variables exist in memory + BASE_IMAGE=$(mvn build-helper:parse-version help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) + cd ../.. + echo "Target base image: $BASE_IMAGE" - # 2. Try to pull the image from the registry + # 2. Safety catch: If it still has unresolved variables or is null, fallback to build + if [[ "$BASE_IMAGE" == *"null object"* || "$BASE_IMAGE" == *"\${"* || -z "$BASE_IMAGE" ]]; then + echo "⚠️ Could not evaluate the image tag cleanly. Building locally to be safe..." + mvn -Pct clean package -f modules/container-base/pom.xml + exit 0 + fi + + # 3. Try to pull the image from the registry echo "Pinging registry for $BASE_IMAGE..." - # Because this is in an 'if' statement, 'set -e' won't crash the script if the pull fails if docker pull "$BASE_IMAGE"; then echo "✅ Image found and pulled successfully! Skipping local build." else From a63a825197fa4f9a2c0d1425226f4f3629283a4b Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 17:12:11 -0400 Subject: [PATCH 11/12] Refactor base image fetching and building logic --- .../workflows/container_integration_tests.yml | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/container_integration_tests.yml b/.github/workflows/container_integration_tests.yml index 4942d78c251..41c9b912723 100644 --- a/.github/workflows/container_integration_tests.yml +++ b/.github/workflows/container_integration_tests.yml @@ -77,28 +77,15 @@ jobs: run: | set -euo pipefail - cd modules/container-base - - # Explicitly run the parse-version goal so the ${parsedVersion...} variables exist in memory - BASE_IMAGE=$(mvn build-helper:parse-version help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) - cd ../.. - + # 1. Ask Maven for the expected tag + BASE_IMAGE=$(cd modules/container-base && mvn build-helper:parse-version help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) echo "Target base image: $BASE_IMAGE" - # 2. Safety catch: If it still has unresolved variables or is null, fallback to build - if [[ "$BASE_IMAGE" == *"null object"* || "$BASE_IMAGE" == *"\${"* || -z "$BASE_IMAGE" ]]; then - echo "⚠️ Could not evaluate the image tag cleanly. Building locally to be safe..." - mvn -Pct clean package -f modules/container-base/pom.xml - exit 0 - fi - - # 3. Try to pull the image from the registry - echo "Pinging registry for $BASE_IMAGE..." - + # 2. Try to pull it. If that fails, build it. if docker pull "$BASE_IMAGE"; then echo "✅ Image found and pulled successfully! Skipping local build." else - echo "⚠️ Image not found remotely. Building it locally from modules/container-base..." + echo "⚠️ Pull failed (image likely doesn't exist yet). Building locally..." mvn -Pct clean package -f modules/container-base/pom.xml fi From 01fefd9adfa1525e19614c1e8d4916e9bcbbd5c0 Mon Sep 17 00:00:00 2001 From: Ash Manda Date: Wed, 12 Aug 2026 17:14:28 -0400 Subject: [PATCH 12/12] Refactor base image fetching logic in workflow --- .github/workflows/dataverse_jsf_tests.yml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dataverse_jsf_tests.yml b/.github/workflows/dataverse_jsf_tests.yml index 691290b948e..6d4f348d4f9 100644 --- a/.github/workflows/dataverse_jsf_tests.yml +++ b/.github/workflows/dataverse_jsf_tests.yml @@ -74,28 +74,15 @@ jobs: run: | set -euo pipefail - cd modules/container-base - - # Explicitly run the parse-version goal so the ${parsedVersion...} variables exist in memory - BASE_IMAGE=$(mvn build-helper:parse-version help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) - cd ../.. - + # 1. Ask Maven for the expected tag + BASE_IMAGE=$(cd modules/container-base && mvn build-helper:parse-version help:evaluate -Dexpression=base.image -q -DforceStdout -Pct) echo "Target base image: $BASE_IMAGE" - # 2. Safety catch: If it still has unresolved variables or is null, fallback to build - if [[ "$BASE_IMAGE" == *"null object"* || "$BASE_IMAGE" == *"\${"* || -z "$BASE_IMAGE" ]]; then - echo "⚠️ Could not evaluate the image tag cleanly. Building locally to be safe..." - mvn -Pct clean package -f modules/container-base/pom.xml - exit 0 - fi - - # 3. Try to pull the image from the registry - echo "Pinging registry for $BASE_IMAGE..." - + # 2. Try to pull it. If that fails, build it. if docker pull "$BASE_IMAGE"; then echo "✅ Image found and pulled successfully! Skipping local build." else - echo "⚠️ Image not found remotely. Building it locally from modules/container-base..." + echo "⚠️ Pull failed (image likely doesn't exist yet). Building locally..." mvn -Pct clean package -f modules/container-base/pom.xml fi