We're trying to implement source control using GitLab and Jenkins. I know how to merge code between two branches in Gitlab. That has to trigger a job in Jenkins to deploy changes from the remote branch to its associated salesforce sandbox. Can we using Ant Script for that? Right now ant script can only move changes between two sandboxes but not between a repository and sandbox. Any suggestions would be highly appreciated.

1 Answer 1


I don't know what GitLab does or does not add to the process, but this answer assumes there is a Git repository somewhere...

Jenkins supports Git in its "Source Code Management" options and so a Jenkins build can be kicked off when there is a change in Git for a particular branch. Jenkins checks the code out to its local workspace (a folder) and then an Ant script can invoke the sf:deploy Force.com Migration Tool to push the code from that workspace into e.g. a sandbox and run the tests.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .