deployer
deployer copied to clipboard
`deploy_path` cannot be relative for all tasks and recipes
- Deployer version: https://github.com/deployphp/deployer/releases/tag/v7.3.1
- Deployment OS: macOS
For example, half of the deploy:release recipe can work with a relative path, but some commands require it to be absolute.
It would be great to have everything support relative paths.
Alternatively, it should be clear that alternative paths are not supported.
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
What do you mean by relative deploy_path? Usally it is a good idea to specify deploy_path from / or from ~.
Might be related to https://github.com/deployphp/deployer/issues/3689#issue-1900532948
Using relative path or ~ does not work when using become as the ~ will always reference the SSH user and not the home of the become user, at least for rsync.
@antonmedv you are right, there is a key piece of information that I was omitting. We built a CI pipeline based on Deployer and added a localhost('ci') host. We wanted to use a ./.deployer/build/ directory in the project root, to perform all the build tasks in.
As the system or paths might change in which we would run the build commands, we hoped we could just use ./deployer/build as our deploy_path and it would interpret this as relative to the project root for the localhost host.
For remote hosts, we do use absolute paths for the deploy_path.
However, relative paths to the user's home directory, would make sense too. We haven't tested using the ~/ syntax yet, which could be an option. Thank you for pointing that out @boesing. As we don't use become for now, it might work for us.