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

Add support for Berkshelf #2

Merged
merged 3 commits into from
May 27, 2016
Merged

Conversation

andrewjamesbrown
Copy link
Contributor

This adds preferential support for Berkshelf instead of Librarian for
uploading a chef-repo to a chef-zero server. If a Berksfile is present,
it will be used, otherwise Librarian is used to upload dependent
cookbooks. Note that 'berks upload' is not used, as that may upload to
the real chef server, though this is a future optimization to consider.

This adds preferential support for Berkshelf instead of Librarian for
uploading a chef-repo to a chef-zero server.  If a Berksfile is present,
it will be used, otherwise Librarian is used to upload dependent
cookbooks.  Note that 'berks upload' is not used, as that may upload to
the real chef server, though this is a future optimization to consider.
@dwradcliffe
Copy link

I think #1 should solve this problem without adding specific Berkshelf support

@@ -7,3 +7,5 @@
require 'chefdepartie/cookbook'
require 'chefdepartie/databag'
require 'chefdepartie/cache'

Chefdepartie.run(background: true, config: 'config.rb', cache: nil)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this done for testing? I don't think we want this hardcoded here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it was done for testing. Also was following the README, which doesn't work without this line... i.e. bundle exec ruby lib/chefdepartie.rb simply returns without it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to merge once this is removed, I'll update the readme

@dalehamel
Copy link
Owner

I think #1 should solve this problem without adding specific Berkshelf support

You're correct about that, I think that this change still probably has merit though, as most people either use librarian or berkshelf

@dalehamel
Copy link
Owner

If the tests were running in travis (which I should make them do), I think they would probably fail with this change, as they assert that it outputs 'uploading librarian cookboks'.

@andrewjamesbrown
Copy link
Contributor Author

Fixed tests with 8d1890c

@dalehamel dalehamel merged commit d76842f into dalehamel:master May 27, 2016
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