mydrive / capistrano-deploytags

Add timestamped Git tags for each environment on deployment
BSD 2-Clause "Simplified" License
123 stars 20 forks source link

Can no longer deploy a specific revision #8

Closed schnittchen closed 11 years ago

schnittchen commented 11 years ago

...because capistrano-deploytags considers it a dirty tree:

*** Preparing to deploy HEAD from branch 'master' to 'production'
*** Whoa there, partner. Dirty trees can't deploy. Git yerself clean first.
schnittchen commented 11 years ago

A workaround is to create a branch and use -s <branchname>

relistan commented 11 years ago

Sorry for not having put this into the readme. This workaround is exactly what we do. I think there is some consideration needed around how to do this better in the plugin. But there are constraints that make it hard to do differently than it is now.

schnittchen commented 11 years ago

What would happen if the check was bypassed?

relistan commented 11 years ago

One of the problems with that is that if you weren't actually up to date with what is in the repo (assuming you deploy directly from git like most people), you would tag the wrong commit with the deployment tag. You could also be deploying code you don't know changed. Lastly, other plugins like capistrano-detect-migrations rely on the tree being correct.

schnittchen commented 11 years ago

If that's the only issue, one could skip deploy tagging as well. Probably one would only want that on some kind of staging setup...

relistan commented 11 years ago

So, since the plugin is all about deploy tagging, I'm wondering how you're using it if not for deployment tags? We don't use it for staging, we use it for tracking which code has been deployed to which production server environment, and the capistrano-detect-migrations plugin uses the tags to idenify new Rails migrations.

schnittchen commented 11 years ago

I have a staging server environment which mirrors production closely (and at times not so closely). capistrano-deploytags tags deploys to that as well, since it's just a multistage environment. Is there a way to configure cap-deploytags to only tag deploys for a subset of multistage envs?

relistan commented 11 years ago

That would be a good feature, but no, not implemented. Pull requests welcome. :)

relistan commented 11 years ago

Closing as there is a known workaround and currently no obvious solution.