Dynamic hosts
#3495
Replies: 1 comment 2 replies
-
As recipes are just simple PHP code you can do anything. if (getenv('FEATURE_HOST')) {
host(getenv('FEATURE_HOST'))
->setDeployPath('~/path/' . getenv('FEATURE_HOST'))
...
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hej there,
i'm working on a workflow to implement some kind of a feature branch deployment. Therefore I want to create a dynamic host based on a existing "meta" host on runtime regarding CLI arguments, so running for example the following command:
With this, for example the deploy path has to be changed to
get('deploy_path') . input()->getOption('feature')
.I know, I can handle this by my own using a init task for extending the deployment process:
But this seems to become tricky, when running single commands, e.g.
vendor/bin/dep deploy:unlock stage --feature=custom-feature-branch-name
.Is there a possibility to hook in the host definition to handle them globally?
Thanks so far, keep up the good work.
Beta Was this translation helpful? Give feedback.
All reactions