问题
In Capistrano v2, I can run deploy on the server specified in the command-line.
cap staging HOSTS="host1,host2" deploy
How can I do the same thing in the Capistrano v3?
example scenario
I have to scale my app, but I don't want to deploy all of my app servers. So I just want to run deploy on the new one.
回答1:
Not sure if you found this or not but the documentation says you can just list it in the command line like this:
cap --hosts=server1,server2 production deploy
See documentation here: Host Filtering Docs
See code here: Code Filtering Link
Looking at the code, it appears to be able to accepts HOSTS also.
See test confirming this: Test Confirming Both Options
来源:https://stackoverflow.com/questions/20783552/can-capistrano-v3-specify-hosts-in-command-line-like-v2-does