REBELinBLUE / deployer

Deployer is a free and open source deployment tool.
http://phpdeployment.org
MIT License
909 stars 185 forks source link

Custom tokens/variables #122

Open alsotop opened 8 years ago

alsotop commented 8 years ago

I'd like to suggest a new feature for deployer with the option of custom tokens/variables, being the ability to set up tokens much like {{ release_path }} and {{ branch }} but user-defined tokens that can be set per server.

There could be an interface for defining a new custom token, and then perhaps provide a default value, and then another interface for setting up those custom tokens on a per-server basis. I suppose this interface could either be tabular so that you can configure all at once, or per server (and be part of editing the server interface).

The tokens could then be used within commands just like the existing tokens.

This would allow more advanced customisation of deployment scripts that can run differently per server. This effect can already be emulated by creating custom commands and specifying which servers they are to run on, but this does mean you have many more commands to maintain, and this potentially could be easier to manage.

REBELinBLUE commented 8 years ago

:+1: Someone at work has asked for a similar thing so it is definitely on my list of things to do.

Would also be useful for when using templates, at work we have a path which is different per project which in the template is currently {{ client_name }} which we have to change on the project when we set it up

alsotop commented 8 years ago

The {{ client_name }} thing sounds like something we'd use here too in exactly the same way you described.