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 deploy command #36

Merged
merged 11 commits into from
Mar 14, 2017
Merged

Add deploy command #36

merged 11 commits into from
Mar 14, 2017

Conversation

mtylty
Copy link
Member

@mtylty mtylty commented Mar 14, 2017

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.

@mtylty mtylty requested a review from kennyadsl March 14, 2017 11:20
@mtylty mtylty mentioned this pull request Mar 14, 2017
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.
Copy link
Member

@kennyadsl kennyadsl left a 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"
Copy link
Member

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?

Pulsar::IdentifyRepositoryLocation, Pulsar::IdentifyRepositoryType,
Pulsar::CreateRunDirs, Pulsar::CloneRepository, Pulsar::CreateCapfile,
Pulsar::CreateDeployFile, Pulsar::CopyEnvironmentFile,
Pulsar::RunBundleInstall, Pulsar::RunCapistrano, Pulsar::Cleanup
Copy link
Member

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

@@ -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
Copy link
Member

Choose a reason for hiding this comment

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

same here

@mtylty mtylty force-pushed the add-deploy-command branch 3 times, most recently from ec6732d to 067e0a2 Compare March 14, 2017 16:40
@mtylty mtylty force-pushed the add-deploy-command branch 2 times, most recently from 107b27e to 94f090f Compare March 14, 2017 17:07
@mtylty
Copy link
Member Author

mtylty commented Mar 14, 2017

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 🙈 🙉 🙊

@mtylty mtylty merged commit 45a8f03 into capistrano-3 Mar 14, 2017
@mtylty mtylty deleted the add-deploy-command branch March 14, 2017 17:09
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.

2 participants