In this post we conclude the setting up of CircleCI for Salesforce.
Overview
The diagram below highlights how the different components are connected to enable the workflow described in part 1 of this series.
Force.com Migration Tool
The force.com migration tool is a Ant based utility that essentially allows us to automate the process of fetching components from one org and deploy to a target org. For more details check out the official documentation
package.xml
Defines which components to retrieve from a particular org or deploy to a particular org. For more information check out the official documentation
circle.yml
Since our app is not a standard web app, we need to tell CircleCI how to build our app i.e. how to run the migration tool so that the build process is kicked
off. That is the purpose of this yml file. Below is an example
test:
override:
- ant -f build/build.xml -lib build/lib/ test:
timeout: 600
Environment Variables
Since we are deploying to a another org, we need a mechanism for storing the login credentials for the target org. You can reference environment variables in the build.xml
using the syntax below.
<sf:deploy username="${env.username}"
password="${env.password}"
serverurl="${env.serverurl}"/>