无法配置 Jenkins 以在 cloud foundry 上部署 spring 引导应用程序

Not able to configure Jenkins to deploy a spring boot application on cloud foundry

我有一个 Spring Boot 应用程序公开 REST api (http://localhost:8080/hello-world-rest-demo/api/hello) 并打印 Hello World 字符串。

我已通过 Jenkins 在本地和远程 Tomcat 上成功部署了此应用程序,并且运行良好,没有任何问题。在成功创建 manifest.yml 文件后,我还使用 cf push 命令通过 CLI 将其部署到我的 Cloud Foundry 帐户,并且正在按预期工作(https://hello-world-rest-demo.cfapps.io/api/hello returns 200 状态代码并打印 Hello World)。

但是,问题是我的 JenkinsCloud Foundry 的集成没有按预期工作,我无法通过 Jenkins 部署它(运行未安装 Cloud Foundry CLI 的独立物理机)。

不确定我在这里遗漏了什么。

manifest.yml

---
applications:
- name: hello-world-rest-demo
  path: target/hello-world-rest-demo.war

成功了!

将目标 url 更改为:https://api.run.pivotal.io

您需要为 Target 提供 Cloud Foundry API 端点。对于 Pivotal Web 服务,API 端点是 https://api.run.pivotal.io