This document provides a step-by-step guide on integrating Noibu's release monitoring into your Jenkins build pipeline. By configuring your Jenkins job to trigger a webhook on build events, you can send real-time data to Noibu's release monitoring system.
Prerequisites
- A running Jenkins instance with the necessary permissions to configure jobs.
- A registered Noibu account with access to the webhook endpoint.
-
curl
command-line tool installed on the Jenkins server (typically pre-installed).
Steps
Method 1: Using Jenkins' Built-in "Post-build Actions"
- Navigate to your Jenkins Job: Access the Jenkins dashboard and click on the job you wish to configure.
- Open Configuration: Click the "Configure" button.
- Scroll to Post-build Actions: Navigate to the "Post-build Actions" section of the job configuration.
-
Add Webhook:
- Click the "Add post-build action" drop-down.
- Select "Execute shell" (or your preferred method).
- In the shell command box, add the following
curl
command. Be sure to replacerelease_name
with the actual name of the release:
curl -X POST "https://webhook.noibu.com/jenkins_webhook" -H "Content-Type: application/json" --data '{"release_name": "value"}'
- Save Changes: Click "Apply" and then "Save".
Method 2: Using Jenkins Pipeline Script
If you're using a Jenkins Pipeline, you can integrate the webhook trigger as follows:
- Edit your Jenkinsfile: Open your existing Jenkinsfile where your pipeline is defined.
-
Add Post-Build Webhook: Insert the following post block into your pipeline configuration:
post {
success {
script {
sh '''
curl -X POST "https://webhook.noibu.com/jenkins_webhook" -H "Content-Type: application/json" --data '{"release_name": "value"}'
'''
}
}
} - Commit and Push Changes: Save your Jenkinsfile and push it to your version control system, if applicable.
- Trigger a Build: Manually trigger a build or wait for the next automated build to verify the webhook integration.
Troubleshooting
If you encounter issues, consult the Jenkins console logs and reach out to the Noibu team for support.
Conclusion
You have successfully integrated Noibu's release monitoring system with your Jenkins pipeline. This allows you to monitor your application releases in real-time, thereby enhancing your monitoring and release processes.