-
Notifications
You must be signed in to change notification settings - Fork 9
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 deploy command #36
Conversation
This will use Capfile files in your Pulsar conf repo and generate a proper Capfile so that Cap 3 can be run.
These interactors will bundle install and run capistrano
Running in a separate process it's difficult to stub system Ruby methods (that run Capistrano). This is a workaround but should make the specs easier.
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.
👍 great job, just some code style comments
context.bundle_path = "#{PULSAR_HOME}/bundle" | ||
context.run_path = "#{PULSAR_TMP}/run-#{context.timestamp}" | ||
context.config_path = "#{context.run_path}/conf" | ||
context.cap_path = "#{context.run_path}/cap" |
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.
maybe we can align these variables assignments as we did in other files?
spec/units/organizers/deploy_spec.rb
Outdated
Pulsar::IdentifyRepositoryLocation, Pulsar::IdentifyRepositoryType, | ||
Pulsar::CreateRunDirs, Pulsar::CloneRepository, Pulsar::CreateCapfile, | ||
Pulsar::CreateDeployFile, Pulsar::CopyEnvironmentFile, | ||
Pulsar::RunBundleInstall, Pulsar::RunCapistrano, Pulsar::Cleanup |
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.
I'd personally use one line for each command, just for increase readability
spec/units/organizers/list_spec.rb
Outdated
@@ -11,7 +11,8 @@ | |||
let(:interactors) do | |||
[ | |||
Pulsar::IdentifyRepositoryLocation, Pulsar::IdentifyRepositoryType, | |||
Pulsar::CloneRepository, Pulsar::AddApplications, Pulsar::Cleanup | |||
Pulsar::CreateRunDirs, Pulsar::CloneRepository, Pulsar::AddApplications, | |||
Pulsar::Cleanup |
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.
same here
434b3f8
to
323d591
Compare
ec6732d
to
067e0a2
Compare
107b27e
to
94f090f
Compare
There's a nasty bug on the CI: rubygems/bundler#4602 It's running locally so I'm going to merge this. We'll think about it later 🙈 🙉 🙊 |
This finally adds a rudimentary deploy command that creates a Capistrano 3 folder structure based on Pulsar configurations.
Specs are a little strange and incomplete because I still need to find a way to stub calls to the
cap
command.The pulsar-conf repo is changed as well, the updated structure is on nebulab/pulsar-conf-demo.
A README is also missing but we'll do that on a separate PR.