Jenkins Integration
Connect Jenkins build events to TigerOps. Deploy markers on dashboards, pipeline duration tracking, and failed build correlation with production anomalies.
How It Works
Add Webhook Notification Step
Add a post section to your Jenkinsfile with an HTTP request step that sends build metadata to the TigerOps Events API. Use the httpRequest plugin or a simple sh curl command to forward the build event.
Configure the Pipeline
Add environment variables for TIGEROPS_API_KEY (stored as a Jenkins credential) and TIGEROPS_SERVICE_NAME. The webhook payload includes the build number, branch, commit SHA, status, and duration.
Set Up Credentials
Store your TigerOps API key as a Jenkins secret text credential with the ID tigerops-api-key. Reference it in your Jenkinsfile using the credentials() binding so it is never printed in the build log.
Deployments Appear on Timeline
Every successful or failed build appears as an annotation on TigerOps dashboards. Deploy events are correlated with metric changes so you can see exactly which deployment caused an error spike.
What You Get Out of the Box
Build Event Ingestion
Build started, completed, failed, and unstable events are sent to TigerOps with full metadata: job name, build number, branch, commit SHA, trigger user, and duration.
Deployment Timeline Markers
Every deployment to a production or staging environment appears as a vertical marker on all TigerOps dashboards. Metrics and traces before and after a deploy are instantly comparable.
Pipeline Stage Durations
Send stage-level timing data from your Jenkinsfile to TigerOps to track which pipeline stages are getting slower over time. CI performance regressions are caught before they block developer velocity.
Failed Build Correlation
Failed builds are automatically correlated with production metric anomalies. If an error spike follows a deploy, TigerOps surfaces the deploy event in the incident timeline.
Multi-Branch Pipeline Support
All branches and PR builds are tracked with branch name labels. Production deployments from the main branch are distinguished from feature branch builds in TigerOps dashboards.
Jenkins Metrics via Prometheus
The Jenkins Prometheus plugin exposes job duration, build queue length, and executor utilization metrics. The TigerOps Collector scrapes these for capacity planning and build infrastructure monitoring.
Jenkinsfile Setup
Add a post block to your Jenkinsfile to forward build events to TigerOps.
// Jenkinsfile (Declarative Pipeline)
pipeline {
agent any
environment {
TIGEROPS_API_KEY = credentials('tigerops-api-key')
TIGEROPS_SERVICE = 'my-service'
TIGEROPS_ENV = 'production'
}
stages {
stage('Build') {
steps {
sh 'npm ci'
sh 'npm run build'
}
}
stage('Test') {
steps {
sh 'npm test'
}
}
stage('Deploy') {
when { branch 'main' }
steps {
sh './scripts/deploy.sh'
}
}
}
post {
always {
script {
def buildStatus = currentBuild.result ?: 'SUCCESS'
def duration = currentBuild.duration
// Send deploy/build event to TigerOps Events API
sh """
curl -s -X POST https://api.tigerops.io/v1/events \
-H "Authorization: Bearer ${TIGEROPS_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"event_type": "ci.build",
"service": "${TIGEROPS_SERVICE}",
"environment": "${TIGEROPS_ENV}",
"attributes": {
"ci.build.number": "${BUILD_NUMBER}",
"ci.build.status": "${buildStatus}",
"ci.build.branch": "${GIT_BRANCH}",
"ci.build.commit": "${GIT_COMMIT}",
"ci.build.duration_ms": "${duration}",
"ci.pipeline.name": "${JOB_NAME}"
}
}'
"""
}
}
}
}Common Questions
Do I need to install a Jenkins plugin for TigerOps?
No plugin is required. The integration uses a simple HTTP POST from the Jenkinsfile post section using either the httpRequest plugin or a bare curl command. The TigerOps Events API accepts standard HTTP POST requests.
Can I send deploy events from both declarative and scripted pipelines?
Yes. Declarative pipelines use the post { always { ... } } block. Scripted pipelines use a try/finally block at the top-level. Both approaches result in the same event being sent to TigerOps.
How do I track which commit was deployed?
Include GIT_COMMIT, GIT_BRANCH, and BUILD_NUMBER as fields in the webhook payload. TigerOps stores these as event attributes and displays them in the deploy marker tooltip on dashboards.
Can TigerOps alert on Jenkins build failures?
TigerOps receives build failure events and can trigger alert rules based on them. For example, alert when more than 3 consecutive builds fail on the main branch, or when test failure rate exceeds 20%.
Does the integration work with Jenkins running behind a firewall?
Yes. The Jenkins server makes outbound HTTPS POST requests to the TigerOps Events API. As long as your Jenkins server has outbound internet access on port 443, no inbound firewall rules are required.
Correlate Jenkins Deploys with Production Metrics
Build events, deploy markers, pipeline duration tracking — add one post block to your Jenkinsfile.