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

Berkshelf requires missing from spork actions checking if Berkshelf is defined #130

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jperry
Copy link
Contributor

@jperry jperry commented Jun 5, 2014

Missing requires but the -b option still doesn't show up for me when the two exist in the Gemfile. Any ideas?

@jonlives
Copy link
Owner

jonlives commented Jun 5, 2014

gonna defer this one to @sethvargo to have a look at - he's done most of spork's berkshelf integration as we don't use it

@sethvargo
Copy link
Contributor

Can't we do this once somewhere?

@jonlives
Copy link
Owner

jonlives commented Jun 5, 2014

Having the require in the runner ought to be enough - no idea about the -b option though, I'm guessing that would have to be added to the spork commands manually.

@sethvargo
Copy link
Contributor

You would need to delegate the CLI option for the Berksfile constructor. @jperry I would recommend you use the BERKSFILE_PATH environment variable instead. @jonlives I think this is outside of the scope of spork

@jperry
Copy link
Contributor Author

jperry commented Jun 5, 2014

moved to runner. @sethvargo - I'll try the BERKSFILE_PATH to see if that works.

@jperry
Copy link
Contributor Author

jperry commented Jun 6, 2014

@sethvargo - the env variable didn't help with knife spork. Either way I have berkshelf currently managing my community cookbooks as well as our repo with all out cookbooks. We like using knife spork at the moment to notify hipchat when uploading cookbooks to the chef server. Maybe I'll just change out CI server to just send this message for us for the time being. I'll try and look at the code to see if I can fix spork to work better with berkshekd

@jperry
Copy link
Contributor Author

jperry commented Jun 6, 2014

I just pushed the changes to require 'berkshelf' and fix the options. I tried moving the require into the runner but the way chef loads the files it has to be in each file. Otherwise we move the require into another file and do a require to that for each of the ones l changed.

In addition the code using Berkshelf in the runner.rb is no longer valid for Berkshelf3. I tried getting it to work but I couldn't get berkshelf to tell me the location of the dependency using berksfile.lockfile.retrieve(dependency) as it fails to find the location of the dependency here. Any ideas?

@jperry
Copy link
Contributor Author

jperry commented Jun 6, 2014

Ignore my comment above about not being able to retrieve the location. It was due to me setting the BERKSFILE_PATH which was screwing things up. I removed and all is better. I'll push more changes as I get it working.

@jperry jperry mentioned this pull request Jun 24, 2014
pivotal-casebook pushed a commit to Casecommons/knife-spork that referenced this pull request Jul 9, 2014
Fix copied from mjuarez post here:

jonlives#109

ongoing other issue

jonlives#130
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