X

The Integration blog covers the latest in product updates, best practices, customer stories, and more.

  • November 8, 2017

Using ant to deploy from developer cloud service to SOACS

Jay Kasi
Director, Product Management

This blog leads you step by step to use ant in developer cloud service to deploy to soacs.

Step 1: add certificate and pushed cacerts file to git

Currently deploying to Oracle SOA Cloud Service requires a certificate by default.

If the Oracle SOA Cloud Service server uses HTTPS (recommend using HTTPS for deploy) and requires a certificate to be installed at the client side, then it has to be done in a cacert file that’s located for example at DeveloperCloudServiceExamples/12.2.1.3/HelloWorldExample/HelloWorldApp/certificates/cacert (adjust as appropriate)

The certificate from the Oracle SOA Cloud Service server has to be imported into the cacert file and then the file is pushed to the Oracle Developer Cloud Service Git repository.

The following command installs a certificate to the trust store:

keytool -import -alias SOACSCertificate -file certificateFileName -keystore cacerts -storepass changeit

Step 2: job configuration pointing to cacerts file

This can be  done in three ways:

  • Adding property under Build Parameters
  • Adding key pair as shown below
  • In Java Options like -DProperty=value
                    

Step 3: add ant target to set proxy host and port into build.xml file

<target name="proxy">

       <property name="proxy.host" value="${env.HTTPS_PROXY_HOST}"/>

        <property name="proxy.port" value="${env.HTTPS_PROXY_PORT}"/>

        <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>

    </target>

Step 4: above target should execute before deploy task, for example:

 

     <import file="${basedir}/ant-sca-package.xml"/>

    <import file="${basedir}/ant-sca-deploy.xml"/>

    <import file="${basedir}/ant-sca-test.xml"/>

 

    <target name="deployAll">

        <foreach list="${applications}" param="application" target="deployApplication" inheritall="true" inheritrefs="false"/>

    </target>

 

    <target name="deployApplication">

        <echo>${env.WORKSPACE}/interface_root/${DeployToFolder}/${application}</echo>

        <property file="${env.WORKSPACE}/interface_root/${DeployToFolder}/${application}/build.properties"/>

        <foreach list="${projects}" param="project" target="deployProject" inheritall="true" inheritrefs="false"/>

    </target>

 

    <target name="proxy">

        <property name="proxy.host" value="${env.HTTPS_PROXY_HOST}"/>

        <property name="proxy.port" value="${env.HTTPS_PROXY_PORT}"/>

        <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>

    </target>

 

    <target name="deployProject" depends="proxy">

        <echo>deploy project ${project} for  environment ${deployment.plan.environment}</echo>

        <echo>java home is ${env.JAVA_HOME}</echo>

                --

                --

                --

     </target>

 

 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.