我有一个运行并尝试执行部署脚本的 CICD Bitbucket 管道。
应用程序规范
version: 0.0
os: linux
files:
- source: scripts/osgi-deploy.sh
destination: /home/jboss
overwrite: true
file_exists_behavior: OVERWRITE
hooks:
AfterInstall:
- location: scripts/osgi-deploy.sh
timeout: 180
runas: jboss
osgi-部署工具
echo "about to deploy to osgi-app ($USER) ..."
screen -d -m -R "karaf" bash /home/jboss/scripts/build-start-osgi.sh &
输出
about to deploy to osgi-app (jboss) ...
Must be connected to a terminal.
如您所见,该osgi-deploy.sh
文件已执行并尝试启动screen
,但由于它是从外部进程(AWS CodeDeploy)运行的,因此它会显示。如果我从 CLIMust be connected to a terminal
运行,它会按预期工作。osgi-deploy.sh
我曾尝试使用参数分离屏幕-d
,但是没有效果。