This documentation will help you integrate Jenkins Build Job with Squadcast. With this, you will be able to bring in your build updates, such as, success and failure statuses as incidents on Squadcast.
Integrate with the Jenkins Plugin
Log into your Jenkins account
Install Post build task plugin in Jenkins
Create a user in Jenkins
This user will be used with curl command to fetch the Jenkins job status.
- From the navigation bar on the left, select Services. Pick the applicable Team from the Team-picker on the top. This Service will essentially bring in your build updates from Jenkins, that is, success/ failure and create it as an incident on Squadcast
- Search for Jenkins from the Alert Source drop-down and copy the Webhook URL
For an Alert Source to turn active (indicated by a green dot - Receiving alerts against the name of the Alert Source in the drop-down), you can either generate a test alert or wait for a real-time alert to be generated by the Alert Source.
An Alert Source is active if there is a recorded incident via that Alert Source for the Service in the last 30 days.
Add a Post build task and run the following command in Script text box.
Replace the API URL here with the API Webhook URL you see on Squadcast for the created service.
Replace username and password with your Jenkins username and password.
curl https://raw.githubusercontent.com/SquadcastHub/Integration-scripts/master/jenkins/send-data-to-squadcast.py | python3 - --url *EnterSquadcastAPIURLHere* --username *EnterYourJenkinsUsername* --password *TypeYourJenkinsPassword*
We highly recommend cloning this repo and using your repo link in the above curl call. This will allow you to customize your incident description.
Sample incident created in Squadcast-App