Publishing a build report to Git
As we have seen in Chapter 6, Continuous Integration, we can trigger a Jenkins job as code is pushed to Jenkins using a Git Webhook. Jenkins will start the build using the Ant Migration Tool and deploy metadata to the sandbox. However, whether the build failed or is successful is not shown anywhere. So we need to change the Jenkins job to deploy changes from Git to the sandbox. Go to the Jenkins job that you want to change and click on Configure
.
Add the post-build Git Publisher
step to set the build status to Git commit:
In GitLab, you can view the status of the Jenkins job to check whether is successful or it failed. We can track each commit in Git and see if the deployment to the sandbox step build has passed. If we configure the Jenkins job to run automation test cases after deployment is done in testing the sandbox, we can get the status of the execution of automation test cases in Git: