Skip to content

refactor(embed): drive picoclaw image tags from agent.toml version#188

Merged
RussellLuo merged 3 commits into
OpenCSGs:mainfrom
wanghaojie124:dev
Jun 9, 2026
Merged

refactor(embed): drive picoclaw image tags from agent.toml version#188
RussellLuo merged 3 commits into
OpenCSGs:mainfrom
wanghaojie124:dev

Conversation

@wanghaojie124

Copy link
Copy Markdown
Collaborator
  • 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.
Comment thread .gitlab/ci-picoclaw-version-check.sh Outdated
printf '%s' "${ref##*:}"
}

find_previous_main_commit() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@xxx7xxxx

xxx7xxxx commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

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.
@wanghaojie124

Copy link
Copy Markdown
Collaborator Author

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.

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.

@RussellLuo RussellLuo merged commit 8e061bd into OpenCSGs:main Jun 9, 2026
1 check passed
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.

3 participants