fix: the agent image build reads its Dockerfile from the context #12
Loading…
Reference in a new issue
No description provided.
Delete branch "mc/d50e173f-a8c1-46a2-889f-e1c5b7e1bcc5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Release v0.6.0 (pipeline 65):
image-agentbuilt the executable (32s) butpublishfailed in 4s with Kaniko'serror resolving dockerfile path: please provide a valid path to a Dockerfile within the build context with --dockerfile. Thescanstep did not run. The second workflow of that tag (release, binaries) is separate.Probable cause: the setting
dockerfile: ${CI_WORKSPACE}/docker/agent/Dockerfiledid not resolve to a real file (I assumed Woodpecker substitutesCI_WORKSPACEin 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-contextcopiesdocker/agent/Dockerfileintodist/releasebeside the executable, and the workflow drops thedockerfilesetting, so the plugin's defaultDockerfilein the context (dist/release) is used.task image:agentis unchanged (it uses--file).Evidence
executablestep succeeded, so the context and executable are fine.woodpecker-cli lint --strict .woodpeckervalid; prettier clean. Not run: Kaniko. Thecontext: dist/releaseis 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-agentpublish and scan succeed, thenai/mission-control-agent:<version>exists.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>