2016-08-22 67 views
-1

我在哈德森设置一个工作,以在SVN上构建基于maven的mule应用程序,上传到artifactory,然后将其部署到cloudhub上。骡子哈德森配置(Cloudhub)

我能够构建项目并将其上传到artifactory,但问题是如何在cloudhub上将其部署之后。

我有groovy后构建插件,但不知道写什么脚本来继续。

有没有人可以给我一些指针呢? 在此先感谢

回答

0

您应该使用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> 
+0

虽然它的工作正常,但我的要求是使用groovy后构建.. – Anand

+0

在集成测试中,你会发现一个Groovy脚本,它可以:https://github.com/mulesoft/mule-maven-插件/ BLOB/2.X/src目录/它/ cloudhub /取消部署/ setup.groovy –