Registry /
workflow / apache-airflow-providers-jenkins
Install & Compatibility
Where this runs
tested against v4.2.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 5.279s · 252.9MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 24.2s · import 4.868s · 251MB
256MB installed
● package 256MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
JenkinsHook
✓ from airflow.providers.jenkins.hooks.jenkins import JenkinsHook
JenkinsJobTriggerOperator
✓ from airflow.providers.jenkins.operators.jenkins_job_trigger import JenkinsJobTriggerOperator
JenkinsBuildSensor
✓ from airflow.providers.jenkins.sensors.jenkins_build import JenkinsBuildSensor
✗ from airflow.contrib.sensors.jenkins_build_sensor import JenkinsBuildSensor
Old contrib imports are deprecated and should use the new provider path for Airflow 2+.
This quickstart demonstrates how to trigger a Jenkins job using the `JenkinsJobTriggerOperator`. Before running, configure a Jenkins connection named 'jenkins_default' in your Airflow UI with the appropriate Jenkins server URL, username, and password. The example assumes a Jenkins job named 'my_sample_jenkins_job' exists and accepts 'PARAM1' and 'PARAM2' as build parameters.
from __future__ import annotations
import pendulum
from airflow.models.dag import DAG
from airflow.providers.jenkins.operators.jenkins_job_trigger import JenkinsJobTriggerOperator
# Ensure you have a Jenkins connection configured in Airflow UI:
# Conn Id: jenkins_default
# Conn Type: Jenkins
# Host: http://your-jenkins-server.com:8080
# Login: your_jenkins_username
# Password: your_jenkins_password
with DAG(
dag_id='jenkins_job_example',
start_date=pendulum.datetime(2023, 1, 1, tz="UTC"),
catchup=False,
schedule=None,
tags=['jenkins', 'example'],
) as dag:
trigger_jenkins_job = JenkinsJobTriggerOperator(
task_id='trigger_my_jenkins_job',
jenkins_connection_id='jenkins_default',
job_name='my_sample_jenkins_job',
parameters={'PARAM1': 'value1', 'PARAM2': 'value2'},
allowed_jenkins_states=['SUCCESS', 'UNSTABLE'],
# Optional: You can also specify build_params for a specific build trigger
# build_params={'token': 'YOUR_JENKINS_JOB_TOKEN'}
)
Debug
Known issues
breakingProvider version 3.0.0 and above explicitly requires Apache Airflow 2.2+. Attempting to install on older Airflow versions may lead to unexpected behavior or automatic Airflow upgrades.fixUpgrade your Apache Airflow environment to version 2.2.0 or higher before installing or upgrading to `apache-airflow-providers-jenkins` 3.0.0+.
affects: >=3.0.0
breakingProvider version 2.0.0 introduced breaking changes related to the removal of the `apply_default` decorator, requiring Airflow 2.1.0+. If your Airflow version is older, an automatic upgrade might occur, necessitating a manual `airflow upgrade db`.fixEnsure your Apache Airflow is at least version 2.1.0. If upgrading from pre-2.1.0, manually run `airflow upgrade db` after the upgrade.
affects: >=2.0.0 <3.0.0
gotchaWhen installing Airflow providers, especially with older pip versions (e.g., pip 20.3 in late 2020), dependency resolution issues might occur. This was due to changes in pip's dependency resolver.fixFor modern Airflow (2.x+), ensure you have a recent pip version (>=21.0). If encountering issues, try upgrading pip (`pip install --upgrade pip`) or in older environments, use `pip install --use-deprecated=legacy-resolver` or downgrade pip to `20.2.4`.
affects: <2.x.x of Apache Airflow core, and specific pip versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'airflow.contrib.operators.jenkins_operator'
Using an outdated import path for Jenkins operators/hooks that were part of `airflow.contrib` in Airflow 1.x. In Airflow 2.x, these components moved to dedicated provider packages.
fixUpdate your import statements to use the correct provider path: `from airflow.providers.jenkins.operators.jenkins_job_trigger import JenkinsJobTriggerOperator`.
airflow.exceptions.AirflowException: The conn_id `jenkins_default` isn't defined.
The Jenkins connection specified in the operator's `jenkins_connection_id` parameter has not been configured in the Airflow UI or `airflow.cfg`.
fixNavigate to `Admin -> Connections` in the Airflow UI, click `+` to create a new connection. Set `Conn Id` to `jenkins_default`, `Conn Type` to `Jenkins`, and fill in `Host`, `Login`, and `Password` for your Jenkins server.
jenkins.JenkinsException: Error in request. Status code: 404
The specified Jenkins job name either does not exist on the configured Jenkins server or the Jenkins user lacks the necessary permissions to access/trigger it.
fixVerify the `job_name` in your DAG matches an existing job in Jenkins. Also, ensure the Jenkins user configured in your Airflow connection has 'Build' and 'Read' permissions for that specific job.
Upgrade
Version history
4.2.6latest on PyPI · released Jun 7, 2026
Audit
Dependencies
apache-airflowrequiredCore Apache Airflow installation is required to use this provider.
python-jenkinsrequiredRequired for communicating with the Jenkins API.
apache-airflow-providers-common-compatoptionalOptional dependency for certain compatibility features.