Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with jobs in folders #10

Closed
jf647 opened this issue Feb 20, 2017 · 6 comments
Closed

Does not work with jobs in folders #10

jf647 opened this issue Feb 20, 2017 · 6 comments

Comments

@jf647
Copy link

jf647 commented Feb 20, 2017

When using the Cloudbees Folder plugin, the webhook cannot start jobs that are in folders. The log reports:

WARNING: Job 'foo/bar' is not defined in Jenkins
Feb 19, 2017 10:00:19 PM org.jenkinsci.plugins.gogs.GogsWebHook exitWebHook
WARNING: Job 'foo/bar' is not defined in Jenkins
Feb 19, 2017 10:01:23 PM org.jenkinsci.plugins.gogs.GogsWebHook doIndex
WARNING: Job 'foo/job/bar' is not defined in Jenkins
Feb 19, 2017 10:01:23 PM org.jenkinsci.plugins.gogs.GogsWebHook exitWebHook
WARNING: Job 'foo/job/bar' is not defined in Jenkins

When I move this job to the root of my Jenkins server, it works properly.

In the webhook in gitea, I've tried using url-encoded and raw slashes to separate path elements with no observable change. I suspect gitea is encoding it for me in the later case. I've also tried putting 'job' as an element between the folder and the job, as this is what the Jenkins address bar shows, also without success.

@willemvd
Copy link
Contributor

Tested this and I think you can just use "bar" as the job name in Gogs/Gitea, so:
/gogs-webhook/?job=bar

This also showed me a problem with the fact that we at the moment only look at the job.getName() .
If the name of a job is used in 2 different folders, it is possible that we cannot find the right job.
Will create a new PR to address this issue.

@jf647 could you confirm that only the job name is enough to get the stuff running?

@willemvd
Copy link
Contributor

willemvd commented Mar 3, 2017

Think this can be closed since #12 is merged

@sanderv32
Copy link
Contributor

#12 is merged :-)

@fuhbar
Copy link

fuhbar commented Mar 7, 2017

@willemvd Yes, this works by just supplying the job name while using foldered jenkins setups.

@fuhbar
Copy link

fuhbar commented Mar 7, 2017

@sanderv32 When will this change released? Or how do I use nightly builds or something?

@sanderv32
Copy link
Contributor

sanderv32 commented Mar 7, 2017

@fuhbar You can get an SNAPSHOT artifact from the JenkinsCI buildserver for the time being. Will try to release a the new version before the end of the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants