Skip to content

fix: build Docker image from parent directory to resolve dependencies#28

Merged
aneojgurhem merged 1 commit intomainfrom
fix_release_pipeline
Nov 24, 2025
Merged

fix: build Docker image from parent directory to resolve dependencies#28
aneojgurhem merged 1 commit intomainfrom
fix_release_pipeline

Conversation

@camory
Copy link
Copy Markdown
Collaborator

@camory camory commented Nov 24, 2025

Motivation

The Docker image build is failing with dependency resolution error:

Could not transfer artifact fr.aneo:armonik-worker-domain:pom:0.1.0 
from/to github (https://maven.pkg.github.com/aneoconsulting/ArmoniK.Api): 
status code: 401, reason phrase: Unauthorized (401)

This prevents the release workflow from completing successfully.

Description

Root Cause

The Docker build step was running from the worker/armonik-worker subdirectory:

- name: Build and push Docker image
  working-directory: worker/armonik-worker
  run: ./mvnw -B -ntp clean package -Pdocker

When Maven runs from a subdirectory, it cannot see sibling modules in the reactor. The armonik-worker module depends on armonik-worker-domain, but Maven couldn't find it locally and tried to download it from external repositories:

  1. Looked in GitHub Packages (requires authentication, returns 401)
  2. Version 0.1.0 doesn't exist in GitHub Packages yet
  3. Build fails

Solution

Build from the parent worker directory instead:

- name: Build and push Docker image
  working-directory: worker
  run: ./mvnw -B -ntp clean package -Pdocker

This enables Maven to:

  1. See the multi-module reactor (parent + armonik-worker-domain + armonik-worker)
  2. Build armonik-worker-domain from local source
  3. Build armonik-worker with access to the freshly built dependency
  4. Execute the Docker profile (only affects armonik-worker, which has the jib plugin)

No external repository access needed - everything builds from source.

Changes Made

Changed working-directory from worker/armonik-worker to worker in the "Build and push Docker image" step.

Testing

Expected Behavior

  • Maven builds the full reactor from the worker directory
  • armonik-worker-domain is built first (no download needed)
  • armonik-worker is built with the Docker profile active
  • Docker image is created and pushed successfully

@aneojgurhem aneojgurhem merged commit ec41a56 into main Nov 24, 2025
3 checks passed
@aneojgurhem aneojgurhem deleted the fix_release_pipeline branch November 24, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants