refactor(embed): drive picoclaw image tags from agent.toml version#188
Conversation
wanghaojie124
commented
Jun 9, 2026
- Embed templates are embedded directly without dist/ staging. Local build-all bumps version and image.ref; GitLab CI on main builds and pushes images only when version changes since the previous commit.
Embed templates are embedded directly without dist/ staging. Local build-all bumps version and image.ref; GitLab CI on main builds and pushes images only when version changes since the previous commit.
| printf '%s' "${ref##*:}" | ||
| } | ||
|
|
||
| find_previous_main_commit() { |
There was a problem hiding this comment.
This baseline is too narrow for main-branch push pipelines. Comparing only HEAD vs HEAD~1 misses cases where one push contains multiple commits and the version bump happened in an earlier commit, so the final pipeline can incorrectly skip the image build.
I recommend diffing against the previous processed default-branch tip instead, ideally CI_COMMIT_BEFORE_SHA with HEAD~1 only as a fallback. That makes the decision depend on the whole pushed range, not just the last parent.
A simple shape would be:
compare_base=${CI_COMMIT_BEFORE_SHA:-$(git rev-parse HEAD~1)}
then either compare version at ${compare_base} vs HEAD, or more directly check whether internal/templates/embed/<name>/agent.toml changed in ${compare_base}..HEAD and, if it did, always validate that version matches the [image].ref tag before deciding whether to build.`
Compare CI_COMMIT_BEFORE_SHA..HEAD instead of HEAD~1 so multi-commit pushes still trigger image builds when version bumps land earlier in the range. Ignore locally generated picoclaw-build.env.
|
Can we add a development document to indicate which content and files should be updated if Picoclaw/Openclaw has been upgraded for local dev? for example, I have updated some code in local PicoClaw, and I made the local dev image with tag like 2026.6.9, how should I update stuff to use that image. |
Use embed Dockerfile ARG PICOCLAW_IMAGE as the single source of truth; omit docker build-arg unless PICOCLAW_BASE_IMAGE is explicitly set. Fix empty-array expansion on macOS bash 3.2 and drop stale CI base tag.
Thanks for the suggestion. For local PicoClaw dev, update only the embed template Dockerfiles (picoclaw-manager / picoclaw-worker) and set ARG PICOCLAW_IMAGE to your local base image tag (e.g. .../picoclaw:2026.6.9). Then run make build-all. No Makefile or CI changes needed. |