【问题标题】:Automating Deployment of SOA project onto weblogic server using jenkins使用 jenkins 将 SOA 项目自动部署到 weblogic 服务器上
【发布时间】:2017-06-13 13:48:46
【问题描述】:

我需要帮助才能使用 Jenkins 将 OSB 组合部署到 Weblogic 服务器上。我使用 maven 作为我的构建工具。现在我正在使用 mvn pre-integration-test 命令部署项目。我需要帮助来编写部署脚本/插件以将我的工件部署到 weblogic 服务器上。

这是我的 osbProject POM.xml,它使用服务总线插件生成 sbar,我正在使用 DEV 配置文件将生成的 sbar 部署到 weblogic 12c 上

<modelVersion>4.0.0</modelVersion>

<parent>
   <groupId>com.oracle.servicebus</groupId>
    <artifactId>sbar-project-common</artifactId>
    <version>12.2.1-1-0</version>
    <relativePath></relativePath>
</parent>

<groupId>ServiceBusApplication1</groupId>
<artifactId>SBProject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>sbar</packaging>

<description/>
 <build>
            <plugins>
                <plugin>
                    <groupId>com.oracle.servicebus-plugin</groupId>
                    <artifactId>oracle-servicebus-plugin</artifactId>
                    <version>12.2.1-1-0</version>
                    <configuration>
                    </configuration>    
                </plugin>
            </plugins>
  </build>

<profiles>  
   <profile>
        <id>Dev</id>
       <properties>
            <oracleServerUrl>http://serverDev.com:7001</oracleServerUrl>
            <oracleUsername>username</oracleUsername>
            <oraclePassword>password</oraclePassword>
            <oracleHome>path to oracle home</oracleHome>
            <customization>path to configuration file</customization>
        </properties>

   </profile>
 </profiles>
</project>

This deploy onto sbconsole of  SOADEV server 

【问题讨论】:

    标签: maven jenkins-plugins soa weblogic12c


    【解决方案1】:

    您可能正在寻找distibutionManagement

    支持部署的项目的分发信息 站点和工件分别到远程 Web 服务器和存储库

    <distributionManagement>
      <repository>
        <id>internal.repo/</id>
        <name>MyCo Internal Repository</name>
        <url>Host to Company Repository/ Server in your case</url>
      </repository>
    </distributionManagement>
    

    注意 - 请根据您要指定的服务器替换详细信息以将工件上传/部署到。

    使用它你可以稍后简单地执行 maven 命令

    mvn deploy
    

    将您的工件部署到服务器 url,其中还包括您正在执行的当前 pre-integration-test

    【讨论】:

    • 我没有部署到任何暂存区。我们没有联系/人工制品来展示我们的人工制品。我需要将这些工件部署到我的不同环境中,例如 QA、INT、UAT 和 prod。
    • 我正在使用 Profiles 来定义这些环境。但我需要帮助将我的构建配置与部署配置分开。
    • @Joe 那些环境有一些主机 IP 或名称?
    • @Joe 使用个人资料,您可以使用完整的详细信息更好地更新问题。
    • 我用 POM.xml 更新了问题供您参考。