节点(maven)将应用程序部署到多个环境

Node (maven) to deploy the application to several environments

Jelastic上,我创建了一个用于构建应用程序的节点(maven),有几个相同的环境(NGINX + Spring Boot)区别在绑定到它的数据库并配置 SSL.

任务是保证在构建应用(* .jar)后,同时部署到这几个环境,如何实现?

编辑项目时,可以只指定一个环境,不提供多选。

允许只指定一个环境

我们建议使用一个存储库分支创建一些环境,并且 运行 通过 API https://docs.jelastic.com/api/#!/api/environment.Vcs-method-Update 将整个代码推送到 VCS 进行更新。

可以使用CloudScripting technology for attaching custom logic to onAfterBuildProject event and deploying the project to additional environments after build is complete. Please check this JPS as an example of the code syntax. Most likely you will need to use DeployProjectAPI方法。