![force.com ant migration tool force.com ant migration tool](https://royalsocietypublishing.org/cms/asset/77e4f940-2407-44a2-b5a4-9e08eb4c61b5/rsif20170413f01.jpg)
![force.com ant migration tool force.com ant migration tool](https://dazeworks.com/wp-content/uploads/2018/05/ant-migration-tool-salesforce.jpg)
Select “With Ant” option, choose the Ant version and the targets (the target is the task name from build.xml).Let’s leave the Build Trigger section blank as we will build this manually as of now.
#Force.com ant migration tool code#
Select None for any Source Code Mangement, as we will be using our local project.Start with creating a new Freestyle project.Let’s start from creating a task to build my local project. It should look something like below figure. Under Ant section on the screen, provide the folder location of your ant installation. Prior to this, if you want to use ant distribution already installed on your local machine (which you will most likely have), and you want to use that installation as part of Jenkins, then setup the ANT_HOME in Jenkins Global Tool Configuration.
![force.com ant migration tool force.com ant migration tool](http://theblogreaders.com/wp-content/uploads/2018/08/deployment-model.png)
Now that all pre-requisites have been completed, it’s time to setup the CI task in Jenkins. The build.properties consists the usual details to connect to the org. If you observe there is a mix of providing the location for ant jar and the project location, it’s just out of experimentation, use whichever style suits you best. What I have mentioned in the build.xml is the path to my local project which I want to build. The build.xml is pretty lean which consists only one task as of now which validates the apex classes only. During the course had also installed the recommends plugins.īefore configuring the task in Jenkins, make sure you have the project available (obviously it will be, but just a reminder) and the related build files ready. I downloaded Jenkins distribution from here and followed the steps to setup it locally. Next is getting up a CI server, which in my case was Jenkins.
#Force.com ant migration tool how to#
You should by now have used ant migration tool and familiar with the build.xml and build.properties and how to deploy package from your local machine in a sandbox. If you are in the same quest as I was, it all starts with ant migration tool. In the next part, I will detail out to configure a Jenkins task to integrate with BitBucket and build the project from the source code repository. The post is a two series, where in the first part I have detailed out to configure a basic Jenkins task to build a local project. This post is specifically around all the things that I learnt and did to get it running, and if at all it helps anyone. But in my quest to learn about Salesforce CI, I had the opportunity of starting from scratch where I used GIT commands, setup Jenkins, created account on BitBucket and finally integrated everything together to run ant migration tool for builds. Well, to start with, this is definitely not a new topic and has been discussed around at lots of places and lot many times.