我在 Bitbucket 存储库中有一个闪亮的应用程序,我想运行然后停止管道中的应用程序。我的bitbucket-pipelines.yml
image: rocker/verse:3.5.0
pipelines:
default:
- step:
script:
- cd /opt/atlassian/pipelines/agent/build
- Rscript -e 'install.packages(c("shiny", "googleAuthR", "dplyr",
"googleAnalyticsR", "knitr", "rmarkdown", "jsonlite"),
repos = "https://cran.rstudio.com/")'
- Rscript -e 'shiny::runApp(appDir = file.path("/opt/atlassian/pipelines/agent/build/", "app"))'
- Rscript -e 'shiny::stopApp()'
一切都加载并成功运行,但最后一行从未运行;管道位于shiny::runApp()
命令上:
管道只会让应用程序运行,直到我手动停止管道。
如何强制最终shiny::stopApp()
运行并关闭应用程序从而完成管道?
尝试将 run app 命令更改为:
- Rscript -e 'shiny::runApp(appDir = file.path("/opt/atlassian/pipelines/agent/build/", "app"))' &
这将在单独的进程中启动 run app 命令。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句