Skip to content

[WIP] makefile hardening/cleanup#1049

Open
onong wants to merge 7 commits into
masterfrom
makefile_hardening
Open

[WIP] makefile hardening/cleanup#1049
onong wants to merge 7 commits into
masterfrom
makefile_hardening

Conversation

@onong

@onong onong commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Harden/cleanup/fix the makefiles of the many minor issues, oversights and whatnot.

onong added 7 commits June 16, 2026 16:07
Add clean, clean-image, and clean-all targets to remove locally
generated agent binaries, version metadata, and Docker image tags
produced by the image build.
This preserves make flags and jobserver propagation for nested targets.
Only add the calicovpp/ctl:latest tag when ALSO_LATEST=y.

Previously, ALSO_LATEST=n still evaluated as true because it was non-empty.
Replace docker push --all-tags with explicit tag pushes.

Using --all-tags makes pushes depend on local Docker state. For example,
ALSO_LATEST=n can still push a stale local :latest tag left by an earlier
build. It can also publish unrelated local tags for the same repository.

Push only the tags created by the current target.
…ging source

push was missing a .PHONY declaration, and the ALSO_LATEST docker tag
commands were sourcing from :latest/:prerelease local tags rather than
:$(TAG). That could fail when those moving tags do not exist locally, or
publish stale tags left by an earlier build.
Replace sed -i with a temporary file and mv so manifest generation works
with both GNU sed and BSD/macOS sed.
Name the Prometheus container and remove that exact container before run and
during stop. The previous stop target matched any docker ps line containing
"prometheus", which could stop unrelated containers, and failed when no match
existed.

Remove prometheus.yml with rm -f so repeated stop calls succeed.

@sknat sknat left a comment

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.

looks good, let's maybe wait on #994 to be merged before

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