JenkinsJobTriggerOperator

Jenkins

Trigger a Jenkins Job and monitor it’s execution. This operator depend on python-jenkins library, version >= 0.4.15 to communicate with jenkins server. You’ll also need to configure a Jenkins connection in the connections screen.

View Source

Last Updated: Apr. 5, 2021

Access Instructions

Install the Jenkins provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

jenkins_connection_idstrThe jenkins connection to use for this job
job_namestrThe name of the job to trigger
parametersstr, Dict, or ListThe parameters block provided to jenkins for use in the API call when triggering a build. (templated)
sleep_timeintHow long will the operator sleep between each status request for the job (min 1, default 10)
max_try_before_job_appearsintThe maximum number of requests to make while waiting for the job to appears on jenkins server (default 10)
allowed_jenkins_statesOptional[Iterable[str]]Iterable of allowed result jenkins states, default is ['SUCCESS']

Documentation

Trigger a Jenkins Job and monitor it’s execution. This operator depend on python-jenkins library, version >= 0.4.15 to communicate with jenkins server. You’ll also need to configure a Jenkins connection in the connections screen.

Was this page helpful?