phallstrom / slackistrano

Slack integration for Capistrano deployments.
MIT License
373 stars 74 forks source link

Default deployer name to local_user capistrano config value #87

Closed KieranP closed 6 years ago

KieranP commented 6 years ago

Had issue where when using gitlab CI, neither USER nor USERNAME persists into the slackistrano code. Capistrano already provides a local_user config for this, so am making it use that, and fall back to what it was before.

phallstrom commented 6 years ago

Nice. It’s been awhile since I’ve used Capistrano. Is local user new? Wonder if we should move to prefer that? If you happen to have a link to it’s documentation...

KieranP commented 6 years ago

@phallstrom https://capistranorb.com/documentation/getting-started/configuration/ . <- search for "local_user". It's capistranos way of identifying who did the deploy, and defaults to the system account name. In our case, we override this with the git user.name value, and would be great if slackistrano used this value also. We've got this change running on production with no issues.

phallstrom commented 6 years ago

Interesting. I just opened https://github.com/capistrano/capistrano/pull/2003 to update their docs.

Given the true default value of capistrano's local_user do you think we even need the default? I suppose it doesn't hurt in case they've set it to nil... thoughts?

KieranP commented 6 years ago

@phallstrom I kept the slackistrano use of ENV vars for backwards compatibility, incases where (like you mentioned) local_user is nil, and they were previously relying on the USER or USERNAME values.

phallstrom commented 6 years ago

@KieranP Thanks! 3.8.3 is on it's way to Rubygems.