fix: the agent image build reads its Dockerfile from the context #12

Merged
morten-olsen merged 4 commits from mc/d50e173f-a8c1-46a2-889f-e1c5b7e1bcc5 into main 2026-10-07 15:58:09 +02:00
Contributor

Summary

Release v0.6.0 (pipeline 65): image-agent built the executable (32s) but publish failed in 4s with Kaniko's error resolving dockerfile path: please provide a valid path to a Dockerfile within the build context with --dockerfile. The scan step did not run. The second workflow of that tag (release, binaries) is separate.

Probable cause: the setting dockerfile: ${CI_WORKSPACE}/docker/agent/Dockerfile did not resolve to a real file (I assumed Woodpecker substitutes CI_WORKSPACE in settings; the failure suggests it does not, or Kaniko wants the file inside the context). I could not reproduce Kaniko here, so this is a hypothesis.

Fix without relying on it: task release:agent-context copies docker/agent/Dockerfile into dist/release beside the executable, and the workflow drops the dockerfile setting, so the plugin's default Dockerfile in the context (dist/release) is used. task image:agent is unchanged (it uses --file).

Evidence

  • Error from Morten's paste of pipeline 65; the executable step succeeded, so the context and executable are fine.
  • woodpecker-cli lint --strict .woodpecker valid; prettier clean. Not run: Kaniko. The context: dist/release is still relative, which the plugin passes through as --context; if the next run fails on that, the fix is the same pattern with an absolute path from a shell step.

Merge danger

Config only; the workflow runs on tags only. Needs a new release after merging (the failed v0.6.0 tag keeps its old config).

Rollback

Revert the commit.

After rollout

New tag: image-agent publish and scan succeed, then ai/mission-control-agent:<version> exists.

## Summary Release v0.6.0 (pipeline 65): `image-agent` built the executable (32s) but `publish` failed in 4s with Kaniko's `error resolving dockerfile path: please provide a valid path to a Dockerfile within the build context with --dockerfile`. The `scan` step did not run. The second workflow of that tag (`release`, binaries) is separate. Probable cause: the setting `dockerfile: ${CI_WORKSPACE}/docker/agent/Dockerfile` did not resolve to a real file (I assumed Woodpecker substitutes `CI_WORKSPACE` in settings; the failure suggests it does not, or Kaniko wants the file inside the context). I could not reproduce Kaniko here, so this is a hypothesis. Fix without relying on it: `task release:agent-context` copies `docker/agent/Dockerfile` into `dist/release` beside the executable, and the workflow drops the `dockerfile` setting, so the plugin's default `Dockerfile` in the context (`dist/release`) is used. `task image:agent` is unchanged (it uses `--file`). ## Evidence - Error from Morten's paste of pipeline 65; the `executable` step succeeded, so the context and executable are fine. - `woodpecker-cli lint --strict .woodpecker` valid; prettier clean. Not run: Kaniko. The `context: dist/release` is still relative, which the plugin passes through as `--context`; if the next run fails on that, the fix is the same pattern with an absolute path from a shell step. ## Merge danger Config only; the workflow runs on tags only. Needs a new release after merging (the failed v0.6.0 tag keeps its old config). ## Rollback Revert the commit. ## After rollout New tag: `image-agent` publish and scan succeed, then `ai/mission-control-agent:<version>` exists.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On a push the unquoted ${CI_COMMIT_TAG##v} expands to nothing and leaves 'agent:' as a mapping
key, so Woodpecker rejected the whole repo's config (pipelines 57-60 errored).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/mc/d50e173f-a8c1-46a2-889f-e1c5b7e1bcc5' into mc/d50e173f-a8c1-46a2-889f-e1c5b7e1bcc5
Some checks failed
ci/woodpecker/push/quality Pipeline failed
ci/woodpecker/push/docs unknown status
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/image Pipeline was successful
6436e832cc
fix: the agent image build reads its Dockerfile from the context
All checks were successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/push/quality Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/image Pipeline was successful
188d020570
Kaniko failed on v0.6.0 with 'error resolving dockerfile path'. The Dockerfile is copied beside
the executable in dist/release, so the plugin's default Dockerfile path is the right one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
morten-olsen deleted branch mc/d50e173f-a8c1-46a2-889f-e1c5b7e1bcc5 2026-10-07 15:58:09 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ai/mission-control!12
No description provided.