Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(images): Support rebuild on other file changes #93

Merged
merged 2 commits into from
Jan 12, 2018

Conversation

TomFrost
Copy link
Member

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 in package.json or Gemfile or requirements.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 a git 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 to binci.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.

@codecov-io
Copy link

codecov-io commented Jan 11, 2018

Codecov Report

Merging #93 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #93   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          11     11           
  Lines         378    381    +3     
=====================================
+ Hits          378    381    +3
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️
src/images.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 922e0d0...1238b7b. Read the comment docs.

@ksafranski
Copy link
Member

Clinton Approves

@TomFrost TomFrost merged commit da6ae94 into master Jan 12, 2018
@TomFrost
Copy link
Member Author

Boom! Release at your convenience :)

@TomFrost TomFrost deleted the rebuild-on-change branch January 12, 2018 17:46
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