如何通过 Bitbucket 管道使用托管运行器更改目录
我有一个简单的管道,我只想在托管跑步者的服务器上导航到特定文件夹。
我的跑步者在线,我在SSH键部分中添加了主机,我的步骤是:
- step:
name: 'Write log to server'
services:
- docker
runs-on:
- self.hosted
- linux
script:
- export HOST_PROJECT_PATH=/home/project/myproject
- ls -a
- cd $HOST_PROJECT_PATH // folder not found but exists
ls -A
显示我的Bitbucket存储库的内容,我无法cd到现有目录(目录存在于服务器上)。
我可以使用管道&跑步者?我需要使用其他服务吗?找不到任何示例或文档。
I have a simple pipeline where I just want to navigate to a specific folder on the server hosting the runner.
My runner is online, I added the host in the SSH Keys section, and my step is:
- step:
name: 'Write log to server'
services:
- docker
runs-on:
- self.hosted
- linux
script:
- export HOST_PROJECT_PATH=/home/project/myproject
- ls -a
- cd $HOST_PROJECT_PATH // folder not found but exists
The ls -a
shows the content of my Bitbucket repository, and I can't cd to an existing directory (directory exists on the server).
Can I do it using pipeline & runner ? Do I need to use an other service ? Can't find any example or documentation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论