【发布时间】:2023-04-12 23:57:01
【问题描述】:
要在 linux ubuntu 服务器上部署应用程序,我有一堆我目前使用 PuTTY 运行的 SSH 命令。服务器有本地帐户serviceaccount1。在 PuTTY 中,我使用 serviceaccount1 连接到服务器并一一执行以下命令
cd /home/serviceaccount1/cr-ml
script /dev/null
screen -S data_and_status
cd cr-ml/notebooks
source activate crml
unset XDG_RUNTIME_DIR
jupyter kernelgateway --api='kernel_gateway.notebook_http' --seed_uri='data_and_status_api.ipynb' --port 8894 --ip 0.0.0.0
...
...
and so on
现在我想使用 Jenkins 自动执行此操作。我安装了SSH 插件,使用带有私钥的SSH 用户名serviceaccount1 配置了凭据
然后新建了一个jenkins项目,并添加了构建步骤Execute shell scripts on remote host using ssh,然后将以上所有命令都添加进去。
当我构建 jenkins 项目时,它卡在执行第二个命令script /dev/null
我看到以下控制台输出
【问题讨论】: