You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tool doesn't account for the workspace. For launching the job I was able to simply pass work/space/path/jobname as the value for the jobname. However when using other methods like getJob(), for example, the tool tries to grab the job name from the api response instead of the one provided by the developer. This doesn't include the workspace, and so this failed.
I patched this up for my own purposes in my fork, here cdc95e0. This is a quick and dirty solution, which only addresses my immediate need. My solution was to
change the return statement of a couple methods, including the getJob() method so that it passes the $jobname it already has as a parameter.
change the Jenkins_Job constructor to receive this variable.
change the Jenkins_Job->getName() method to use that variable.
The work I did was quick and messy, and not thought out. I don't recommend merging it into your code, hopefully its a starting point to help solve the problem.
Thanks for making this to begin with, it saved me a lot of time.
The text was updated successfully, but these errors were encountered:
I'm sorry, meant folders. I had git working directories on the brain and mixed my terminology.
We have our jobs organized into folders. I didn't realize this was introduced by a plugin - I don't know this first hand because I didn't set up a job myself - but I did a quick search and found that there is a folders plugin, so I assume were using something like this.
Since it looks like this is something done by a plugin, is this something you would not support?
Some jenkins jobs are setup within a workspace, and as such the path to that job may be something like
This tool doesn't account for the workspace. For launching the job I was able to simply pass
work/space/path/jobname
as the value for the jobname. However when using other methods likegetJob()
, for example, the tool tries to grab the job name from the api response instead of the one provided by the developer. This doesn't include the workspace, and so this failed.I patched this up for my own purposes in my fork, here cdc95e0. This is a quick and dirty solution, which only addresses my immediate need. My solution was to
getJob()
method so that it passes the$jobname
it already has as a parameter.Jenkins_Job
constructor to receive this variable.Jenkins_Job->getName()
method to use that variable.The work I did was quick and messy, and not thought out. I don't recommend merging it into your code, hopefully its a starting point to help solve the problem.
Thanks for making this to begin with, it saved me a lot of time.
The text was updated successfully, but these errors were encountered: