【问题标题】:Hudson Config for Mule (Cloudhub)Mule 的 Hudson 配置 (Cloudhub)
【发布时间】:2016-08-22 09:17:14
【问题描述】:
我正在 hudson 建立一个工作,在 SVN 上构建基于 maven 的 mule 应用程序,上传到 artifactory,然后将其部署到 cloudhub。
我能够构建项目并将其上传到 artifactory,但问题是之后如何在 cloudhub 上部署它。
我有 groovy 后期构建插件,但不确定要在其中编写什么脚本才能继续。
有没有人可以给我一些指导?
提前致谢
【问题讨论】:
标签:
groovy
mule
hudson
anypoint-studio
cloudhub
【解决方案1】:
您应该使用mule-maven-plugin,这是当前支持通过 Maven 部署到 CloudHub 的方式。这是一个示例插件配置:
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<deploymentType>cloudhub</deploymentType>
<muleVersion>3.7.0</muleVersion> <!-- This is the runtime version as it appears on the CloudHub interface -->
<username>myUsername</username>
<password>myPassword</password>
<environment>Production</environment>
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
记得把它添加到你的 settings.xml 中,这样 Maven 才能找到插件:
<pluginRepositories>
<pluginRepository>
<id>mule-public</id>
<url>https://repository.mulesoft.org/nexus/content/repositories/releases</url>
</pluginRepository>
</pluginRepositories>