Skip to content

Commit b7223ac

Browse files
jcastro-dotcmsspboltonclaude
authored
fix(integration tests) #34422 : Adding new Workflow Step To Maven Job Action (#34441)
### Proposed Changes * As part of the efforts to correctly use the more recent version of the Docker Maven Plugin to our build process, we need to add this new Workflow Step. This change was reviewed and approved via huddle by @spbolton and must be merged in order to move on to the next blocker in the build process. --------- Co-authored-by: Stephen Bolton <[email protected]> Co-authored-by: Claude Sonnet 4.5 <[email protected]>
1 parent 0dc5f1c commit b7223ac

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/actions/core-cicd/maven-job/action.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,35 @@ runs:
238238
name: docker-build-context
239239
path: dotCMS/target/docker-build.tar
240240

241+
- id: get-sdkman-version
242+
name: Get SDKMAN Java Version
243+
if: ${{ inputs.generate-docker == 'true' }}
244+
shell: bash
245+
run: |
246+
if [ -f ".sdkmanrc" ]; then
247+
SDKMAN_JAVA_VERSION=$(awk -F= '/^java=/ {print $2}' .sdkmanrc)
248+
echo "SDKMAN_JAVA_VERSION=${SDKMAN_JAVA_VERSION}" >> $GITHUB_ENV
249+
echo "Extracted SDKMAN_JAVA_VERSION: ${SDKMAN_JAVA_VERSION}"
250+
else
251+
echo "Error: .sdkmanrc file not found"
252+
exit 1
253+
fi
254+
255+
- id: build-docker-image-from-archive
256+
name: Build Docker Image from Archive
257+
if: ${{ inputs.generate-docker == 'true' }}
258+
shell: bash
259+
run: |
260+
# Extract the build context from the tar archive
261+
mkdir -p /tmp/docker-context
262+
tar -xf dotCMS/target/docker-build.tar -C /tmp/docker-context
263+
264+
# Build the Docker image from the extracted context
265+
docker build --build-arg SDKMAN_JAVA_VERSION="${SDKMAN_JAVA_VERSION}" -t dotcms/dotcms-test:${{ inputs.version }} /tmp/docker-context
266+
267+
# Verify the image was created
268+
docker images dotcms/dotcms-test:${{ inputs.version }}
269+
241270
- id: save-docker-image
242271
name: Save Docker Image to Tar File
243272
if: ${{ inputs.generate-docker == 'true' }}

0 commit comments

Comments
 (0)