pycontribs / jenkinsapi

A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers
http://pypi.python.org/pypi/jenkinsapi
MIT License
858 stars 483 forks source link

Multibranch Pipeline Job cannot be found #763

Open omerfarukdogan opened 4 years ago

omerfarukdogan commented 4 years ago
ISSUE TYPE

Bug Report

Jenkinsapi VERSION

0.3.9

Jenkins VERSION

2.176.3

SUMMARY

Multibranch Pipeline jobs cannot be reached using jenkinsapi. I have a multibranch pipeline job. I want to access this job via jenkinsapi.

jenkins.get_job("JOB_NAME")
EXPECTED RESULTS

I expect to be able to reach the job, edit its config, etc.

ACTUAL RESULTS

The line above raises UnknownJob error.

I can access each individual branch, but it is no use since I want to edit the main job's config.

jenkins.get_job("JOB_NAME/master")  # successful
joelee2012 commented 3 years ago

you may want to try https://api4jenkins.readthedocs.io/en/latest/index.html