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 485 forks source link

Multibranch Pipeline Job cannot be found #728

Closed omerfarukdogan closed 4 years ago

omerfarukdogan commented 5 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
chrismaes87 commented 5 years ago

in release 0.3.10, I added jenkins.create_multibranch_pipeline_job() (see https://github.com/pycontribs/jenkinsapi/pull/715) .

This might not be exactly what you want/need, but it might help you on the way. I am also using multibranch pipeline jobs and jenkinsapi seems to have some trouble with those...

chrismaes87 commented 5 years ago

you can use jenkins.get_job_by_url though to edit the main job's config.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

Closed due to inactivity