简体   繁体   English

我们如何从命令行在Red Hat JBoss BPM Suite中部署项目?

[英]How can we deploy a project in Red Hat JBoss BPM Suite from command line?

We ultimately want to have our Business Processes running on a server that is running the JBPM Suite, but we also want to have Jenkins building and deploying our code from GitLab. 我们最终希望业务流程在运行JBPM Suite的服务器上运行,但是我们也希望Jenkins从GitLab构建和部署我们的代码。

We can package up the code into a jar successfully it seems, but apart from copying this to the server we are not sure how to then tell the suite to actually deploy the processes. 看起来我们可以成功地将代码打包到jar中,但是除了将其复制到服务器之外,我们不确定如何告诉套件实际部署流程。

After a lot of googling it seems most lower-level approaches still end up loading the GUI and clicking "Build & Deploy" etc. For example this page: http://planet.jboss.org/post/how_to_deploy_processes_in_jbpm_6 经过大量的搜寻之后,似乎大多数较低层的方法仍然最终会加载GUI并单击“ Build&Deploy”等。例如,此页面: http : //planet.jboss.org/post/how_to_deploy_processes_in_jbpm_6

Does anyone know if this is possible, and if so what is the approach? 有谁知道这是否可能,如果可以,那该怎么办?

Thanks 谢谢

That is one way, another way would be to use a repository manager like Sonatype Nexus and deploy a packaged JAR to there. 这是一种方式,另一种方式是使用诸如Sonatype Nexus之类的存储库管理器,然后在其中部署打包的JAR。 Then in the POM for the BPM project create a profile against this repository. 然后在BPM项目的POM中针对此存储库创建一个配置文件。

Then you can deploy your code in the same way (using a POST) but without having to push anything with SSH. 然后,您可以以相同的方式(使用POST)部署代码,而不必使用SSH推送任何内容。 BPM will go to nexus and download the required dependencies. BPM将转至链接并下载所需的依赖项。

<profile>
        <id>nexus</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <repositories>
            <repository>
                <id>example</id>
                <name>example group</name>
                <url>url to nexus</url>
                <layout>default</layout>
            </repository>
        </repositories>
</profile>

cheers! 干杯!

I believe we have a plan now. 我相信我们现在有一个计划。

Firstly we clone a git repo using the Suite frontend. 首先,我们使用Suite前端克隆一个git repo。 Then we can push changes to the git repo inside the BPM Suite server using SSH. 然后,我们可以使用SSH将更改推送到BPM Suite服务器内部的git repo。

Then we can tell the suite to deploy using the REST API, like this: 然后,我们可以告诉套件使用REST API进行部署,如下所示:

http://localhost:8082/business-central/rest/deployment/com.company.app:AppName:1.0/deploy http:// localhost:8082 / business-central / rest / deployment / com.company.app:AppName:1.0 / deploy

I also discovered you need to POST with the header "Content-Type" added with value "application/json" otherwise it accepts the deployment request successfully but doesn't actually do it. 我还发现,您需要使用标头“ Content-Type”添加值“ application / json”进行POST,否则它将成功接受部署请求,但实际上并没有执行。 Also the body apparently can't be empty so we pass in "{ }" as the body, and then everything deploys like that 同样,主体显然不能为空,因此我们将“ {}”作为主体传递,然后所有东西都像这样展开

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM