2

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.

2

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.