feat(images): Support rebuild on other file changes #93
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.
Binci already rebuilds containers when the Dockerfile is changed (assuming we're not using
from
), however there are other changes one can make to a repo that would alter a built container without needing to modify the Dockerfile. For example, if a container is built with all the app's dependencies, and a dependency is added or changed inpackage.json
orGemfile
orrequirements.txt
et. al., the next binci run would fail because the container would not be rebuilt with the new requirement. Worse, if a different engineer on the team does agit pull
, binci tasks may start failing for him or her without them having any knowledge that dependencies were ever changed.This PR adds a
rebuildOnChange
property tobinci.yml
that allows the user to list out paths to "monitor". This is not active monitoring -- Binci simply reads the contents of those files into the hash it was already building from the Dockerfile. If any of those files change, the hash will change and the image will be rebuilt before the task runs.