[WIP] makefile hardening/cleanup#1049
Open
onong wants to merge 7 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Harden/cleanup/fix the makefiles of the many minor issues, oversights and whatnot.