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

webhook url is wrong if prefix is defined #2171

Open
laupas opened this issue Oct 21, 2018 · 3 comments
Open

webhook url is wrong if prefix is defined #2171

laupas opened this issue Oct 21, 2018 · 3 comments

Comments

@laupas
Copy link

laupas commented Oct 21, 2018

if i set the --prefix flag, i can not longer trigger jenkins webhooks

Is there any way, to define the url which are pushed to jenkins?

Jenkins log:
jenkins_jenkins.1.1rvsvm0deckl@ADOPlight0 | Oct 21, 2018 1:52:22 PM com.cloudbees.jenkins.GitHubRepositoryName create
jenkins_jenkins.1.1rvsvm0deckl@ADOPlight0 | WARNING: Could not match URL http://10.20.30.40/gitbucket/ADOPlight/ProjectName
jenkins_jenkins.1.1rvsvm0deckl@ADOPlight0 | Oct 21, 2018 1:52:22 PM org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEvent
jenkins_jenkins.1.1rvsvm0deckl@ADOPlight0 | WARNING: Malformed repo url http://10.20.30.40/gitbucket/ADOPlight/ProjectName
jenkins_jenkins.1.1rvsvm0deckl@ADOPlight0 | Oct 21, 2018 1:52:22 PM org.jenkinsci.plugins.github_branch_source.PushGHEventSubscriber onEvent
jenkins_jenkins.1.1rvsvm0deckl@ADOPlight0 | WARNING: http://10.20.30.40/gitbucket/ADOPlight/ProjectName does not match expected repository name pattern

@laupas
Copy link
Author

laupas commented Oct 21, 2018

without setting a --prefix
web url: http://gitbucketurl/prefix/USER/repo
git clone url: http://gitbucketurl/prefix/git/USER/repo.git

without setting a --prefix
web url: http://gitbucketurl/USER/repo
git clone url: http://gitbucketurl/USER/repo

the need of having /git/ inside the git clone url is maybe also one problem for jenkins to get the right url in a webhook request

@kounoike
Copy link
Contributor

It's Jenkins plugin's issue. It assumes ONLY GitHub (Enterprise) style repository URL.

If you want to use GitBucket with Jenkins, you must configure:

  • must use default port (80 for http, 443 for https)
  • don't use prefix

@laupas
Copy link
Author

laupas commented Oct 22, 2018

It would be great if the url posted to jenkins can be configured.
I would like to use gitbucket behind a nginx reverse proxy (with or without prefix).
But as soon the url is not more default, the jenkins plugin is not accepting the url.

Can you add the possibility, to configure the url posted to jenkins on the webhook site? Maybe with some variables like http://$GitBucketUrl/$User/$Project?

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

No branches or pull requests

2 participants