-
Notifications
You must be signed in to change notification settings - Fork 71
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
sotm: use a bundler cache for kitchen runs #538
sotm: use a bundler cache for kitchen runs #538
Conversation
FYI |
20 minutes fast! :-) |
ab11de4
to
965d77c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly this makes me want to vomit - adding an insane amount of complexity just to speed up the tests a bit.
cwd "/srv/#{year}.stateofthemap.org/vendor" | ||
only_if { kitchen? } | ||
only_if { ::Dir.exist?("/srv/#{year}.stateofthemap.org/vendor/bundle") } | ||
not_if { ::File.exist?("#{Chef::Config[:file_cache_path]}/stateofthemap-gem-bundle-cache.tar") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these conditions are pointless if the action is :nothing
because it's not going to run anyway, and when it is run by notifies
they will be ignored.
overwrite false | ||
only_if { ::File.exist?("#{Chef::Config[:file_cache_path]}/stateofthemap-gem-bundle-cache.tar") } | ||
not_if { ::Dir.exist?("/srv/#{year}.stateofthemap.org/vendor/bundle") } | ||
only_if { kitchen? } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why limit it to when running under kitchen? Either it is safe, in which case we can always use it, or it isn't.
Mind if you are caching binaries there would then be questions about invalidating the cache when the dependencies of those binaries change.
965d77c
to
ff6128d
Compare
ff6128d
to
7dbd075
Compare
Going to abandon this PR. Going to replace SOTM sites with docker containers built upstream. |
In kitchen cache the
bundle install
from the first jekyll sotm site and re-use the cache for other sotm runs ofbundle install