-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Right now, build-node-image
will always build a new node and extensions container image. This is wasteful for anything watching the moving tag and thinking there's actually been a change. We should only push a new image if something actually did change.
Of course, change detection is notoriously hard when using a Dockerfile flow, unless e.g. your build is "semantically reproducible" and your git commit fully describes the contents (e.g. lockfiles). What we can do instead though is to just do the build, and then after the fact determine if something actually changed. If the git commit changed, then definitely push. If not, then do an RPM diff (of both the node and extensions images) and push if it changed.
As part of this we should add a FORCE
flag to override change detection.
Also, since we have to calculate that information anyway, we might as well print the diff when we do have a change. Right now, diffs are only easily accessible if the node image ends up being part of a release payload (where the release controller can render that info), but we want visibility for every build.