Salesforce Deployment Managed by Continuous Delivery.
Salesforce Deployments can be a bit tricky with one-off scripts. We have customers using DeployHub who want to include updates to Salesforce as part of their continuous deployment, driven by continuous delivery.
Salesforce provides an Ant Toolkit that helps you call the deployment process. We use their Ant Jar as part of the solution. Our DeployHub process allows the deployment to adapt across the pipeline. No static references to environments are kept in the script.
The Salesforce Ant Jar should be copied into the Ant Library directory so the salesforce task is picked up. The following properties are required: User Name, Password, Server URL and Test Level.
<property="sf.username" value="myusername" />
<property="sf.password" value="mypassword" />
<property="sf.serverurl" value="https://test.salesforce.com" />
<property="sf.testlevel" value="RunLocalTests" />
<!-- Shows deploying code, running all tests, and running tests (1 of which fails), and logging. -->
<!-- Upload the contents of the "codepkg" package, running test cases -->
DeployHub enables this deployment to be extended across the Continuous Delivery Pipeline without the need to create another build.xml or a build.properties.
Future DeployHub Releases
As of publication, the above code has not been added to the DeployHub standard reusable actions and procedures. You should love for this code to be included in the DeployHub installation by the 8.0 version. You can keep track of DeployHub updates and become part of the DeployHub code sharing community at Join the Community.