Closed mdear closed 5 years ago
Hello,
I have no cloudbees jenkins to test it, but maybe if you use this value for jenkins url instead of the one you are using, it may work:
base_url = "https://engci-jenkins-sjc2.cisco.com/jenkins"
BR.
Thanks for the response. I must specify the team-extended URL in order to create projects and launch builds in my team space. Users can be allocated multiple team spaces, the base URL clarifies which one is used for project creation.
Is there another way this issue could be fixed or worked around ?
PR created and has been merged to master 9e0f8772fa2031a56063c77f14bdd8c92658f997
ISSUE TYPE
Jenkinsapi VERSION
0.3.8
Jenkins VERSION
CloudBees Jenkins Enterprise 2.107.36.0.2-fixed
SUMMARY
Attempt to launch a build against a CloudBees team space URL failed with an exception from jenkinsapi.
EXPECTED RESULTS
I successfully used jenkinsapi to create a remote project (not shown), which resulted in a POST to the following URL: https://server.domain.com/jenkins/job/my_team/createItem
I expected the following snippet to work:
ACTUAL RESULTS
The call to job.invoke threw the following exception:
Commenting out this exception allowed the job.invoke call to pass as expected.
USEFUL INFORMATION
On CloudBees, the queue API base URL: https://server.domain.com/jenkins/queue/api/
is not available at the team level, whereas my CloudBees team REST API base URL is as follows: https://server.domain.com/jenkins/job/my_team/api/
As opposed to the typical queue API base URL for a standalone Jenkins server (not CloudBees): http://anotherserver.domain.com:8080/queue/api/