[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Nenad Miksa commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Thank you for enabling the logging - I figured out the problem. The BitBucket API does not allow server names without dot. So while http://rambo/jenkins/job/AndroidCore/687/ was deemed as invalid URL, http://rambo.local/jenkins/job/AndroidCore/687/ was a valid URL. After all it was not bug in plugin - it was a bug in configuration on my server. Just a hint for future - if possible, please write somewhere (in documentation or setup guide) that server name should be a fully qualified name. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Nenad Miksa commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Hi Antonio Mansilla, I've finally received the update with logging enabled. Here are the logs of request and response: Jun 06 09:29:38 rambo jenkins[747]: Jun 06, 2016 9:29:38 AM org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus Jun 06 09:29:38 rambo jenkins[747]: INFO: This request was sent: { Jun 06 09:29:38 rambo jenkins[747]: "state": "INPROGRESS", Jun 06 09:29:38 rambo jenkins[747]: "key": "2a8f71244f064b1edc24a179661da25f", Jun 06 09:29:38 rambo jenkins[747]: "url": "http://rambo/jenkins/job/AndroidCore/687/", Jun 06 09:29:38 rambo jenkins[747]: "name": "AndroidCore #687" Jun 06 09:29:38 rambo jenkins[747]: } Jun 06 09:29:38 rambo jenkins[747]: Jun 06, 2016 9:29:38 AM org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus Jun 06 09:29:38 rambo jenkins[747]: INFO: This response was received: {"error": {"fields": {"url": ["Enter a valid URL."]} , "message": "Bad request"}} After cancelling the build: Jun 06 09:30:02 rambo jenkins[747]: INFO: Bitbucket notify on finish Jun 06 09:30:03 rambo jenkins[747]: Jun 06, 2016 9:30:03 AM org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus Jun 06 09:30:03 rambo jenkins[747]: INFO: This request was sent: { Jun 06 09:30:03 rambo jenkins[747]: "state": "FAILED", Jun 06 09:30:03 rambo jenkins[747]: "key": "2a8f71244f064b1edc24a179661da25f", Jun 06 09:30:03 rambo jenkins[747]: "url": "http://rambo/jenkins/job/AndroidCore/687/", Jun 06 09:30:03 rambo jenkins[747]: "name": "AndroidCore #687" Jun 06 09:30:03 rambo jenkins[747]: } Jun 06 09:30:03 rambo jenkins[747]: Jun 06, 2016 9:30:03 AM org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus Jun 06 09:30:03 rambo jenkins[747]: INFO: This response was received: {"error": {"fields": {"url": ["Enter a valid URL."]} , "message": "Bad request"}} Jun 06 09:30:03 rambo jenkins[747]: Jun 06, 2016 9:30:03 AM org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier perform Jun 06 09:30:03 rambo jenkins[747]: INFO: Bitbucket notify on finish succeeded Hopefully this can help debugging the issue. Add Comment
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Neil Whitworth commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" I have been looking into a similar issues, where I was getting 'BAD REQUEST' responses from BitBucket. In my case I was using the 'Multi-Branch Project' Plugin, which creates a folder, with a job per branch. I traced the BAD REQUEST response back to the value of the "name" field in the build update request. This includes a '»' character from the call to getFullDisplayName in function createBitbucketBuildStatusFromBuild String buildName = build.getProject().getFullDisplayName() + " #" + build.getNumber(); failing log:- May 27, 2016 2:30:48 PM INFO org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus This request was sent: Unknown macro: { "state"} May 27, 2016 2:30:48 PM INFO org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus This response was received: Bad Request changing to use getFullName (which uses a '/' char) fixed my issues. String buildName = build.getProject().getFullName() + " #" + build.getNumber(); May 27, 2016 2:32:46 PM INFO org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus This request was sent: Unknown macro: { "state"} This response was received: {"name": "Jenkins Test/master #21", "links": {"commit": Unknown macro: {"href"} , "self": {"href": "https://api.bitbucket.org/2.0/repositories/rivdevteam/jenkinstest/commit/7fce0b1f41e4f10cdd4faa7a62dd68a38e575e89/statuses/build/b7fa1a78ad87d07cfe5413bbc34e0d84"}}, "url": "http://localhost:8080/job/Jenkins%20Test/branch/master/21/", "created_on": "2016-05-27T13:32:41.883282+00:00", "repository": {"links": {"self": Unknown macro: {"href"} , "html": Unknown macro: {"href"} , "avatar": {"href": "https://bitbucket.org/rivdevt
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Nenad Miksa commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Thank you a lot, Antonio Mansilla. I am looking forward to being able to debug that issue. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Antonio Mansilla commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Hi Nenad Miksa, I've added right now the bitbucket request content to the log. It'll be released tomorrow or next friday, so wait until the new plugin version is available, update it and lets run the build to see what's going on. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title SCM/JIRA link daemon commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Code changed in jenkins User: Antonio Mansilla Path: src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/acac5171f50f61ea098c49778868fdff12ec0ed8 Log: Merge pull request #21 from Flagbit/issue-34651 JENKINS-34788 Add more logging for easy debugging bitbucket request Compare: https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/compare/66a0a8926765...acac5171f50f Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title SCM/JIRA link daemon commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Code changed in jenkins User: Antonio Mansilla Path: src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/35fb7cf5e7bf2638f38baadbd63a6885774b5a52 Log: JENKINS-34788 Add more logging for easy debugging bitbucket request and response Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Nenad Miksa commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Hi Antonio! I can confirm that calling BitBucket with curl as you explained works correctly (I've tried issuing the request from both my laptop and server where Jenkins is installed). When I put some random string which is not in URL form in field "url", then I get the same error as observed in jenkins log. Is there a way for me to enable logging which will show me what is the value plugin puts in "url" field before issuing a request? Btw, one side question: how does plugin perform when I have option "merge before build" enabled in my Git plugin? I've tried issuing a curl request with merge commit created before build and Bitbucket responded with "Changeset not found.". Does in this case plugin send the commit ID of the original commit (before making a merge)? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Antonio Mansilla commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Hi Nenad, that's weird since it seems the communication with bitbucket is working, so the problem should not be caused by your firewall but in the plugin self. Try posting the build status manually from your terminal following this instructions: First get the ACCESS_TOKEN: curl -X POST https://bitbucket.org/site/oauth2/access_token -u "API_KEY:API_SECRET" -d grant_type=client_credentials The response will be something like this: {"access_token": "ACCESS_TOKEN", "scopes": "repository:write", "expires_in": 3600, "refresh_token": "sYf7Ka49Cc4kgFKFTV", "token_type": "bearer"} Use the ACCESS_TOKEN received in the next request: curl -X POST https://api.bitbucket.org/2.0/repositories/REPO_OWNER/REPO_NAME/commit/COMMIT_ID/statuses/build -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -d '{ "state": "SUCCESSFUL", "key": "BAMBOO-PROJECT-X-X", "name": "Build #34", "url": "https://example.com/path/to/build/info", "description": "Changes by John Doe"}' I got to reproduce your problem and it seems that the attribute "url" is being set with a invalid URL value, so I guess it's a plugin internal problem. Before I deep in the plugin code, could you please confirm you get the previous example working? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Nenad Miksa commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Hi Antonio, Jenkins plugin manager tells me that v1.2.0 is being used. I am keeping all my plugins up to date with the exception of "Bitbucket Pullrequest Builder Plugin" which I keep on 1.4.7 since every version after it causes infinite rebuilds of my pull requests (I've already issued the ticket to the author, yet it is still not fixed in 1.4.18). Is there any debug log I can enable to help you find a problem? Can you add logging of the URL to which you are sending request? Currently only server response is logged. I would like to see the entire request and repeat it from commandline with curl - it may be possible that error is due to my firewall configuration. Regards, Nenad Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Antonio Mansilla commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Hi Nenad Miksa, I was trying to reproduce your problem but I'm not able to reproduce it using the last plugin version. Which version of the plugin are you using actually the latest stable is 1.2.0? In case you are not using the latest stable one, could you please update the plugin and try again? Thanks and regards. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Nenad Miksa commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Hi Antonio. What is a "valid URL"? I've tried setting following URLs as "Callback URL" of OAuth consumer, none of them worked: http://141.138.8.191:54321/jenkins http://141.138.8.191:54321 http://bitbucket:keyForBitbucketUserOnJenkinsServer@141.138.8.191:54321/jenkins (this one is used for notifying Jenkins that there was a push into a repository) For security reason, 141.138.8.191:54321 is accessible only from these IP ranges: 131.103.20.160/27, 165.254.145.0/26 and 104.192.143.0/24 (as documented here: https://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html) In Manage Jenkins -> Jenkins Location -> Jenkins URL the set URL is: http://192.168.100.234/jenkins (this URL is accessible only from LAN - not from public Internet). Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Antonio Mansilla started work on JENKINS-34788 Change By: Antonio Mansilla Status: Open In Progress Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Antonio Mansilla commented on JENKINS-34788 Re: Build status notification fails with "Enter a valid URL" Hi Nenad Miksa, there is some configuration checks missing in the video. Because of that I removed the video right now from the wiki page. Could you ensure you have a valid URL for the field Jenkins Location? Take a look here in the wiki page. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-34788) Build status notification fails with "Enter a valid URL"
Title: Message Title Nenad Miksa created an issue Jenkins / JENKINS-34788 Build status notification fails with "Enter a valid URL" Issue Type: Bug Assignee: Antonio Mansilla Components: bitbucket-build-status-notifier-plugin Created: 2016/May/13 9:14 AM Environment: Jenkins v2.2 on ArchLinux Priority: Major Reporter: Nenad Miksa I've setup my environment as described in this video: https://www.youtube.com/watch?v=uu5XcU4EPzQ However, when build starts and finishes, I don't see the status on BitBucket commits. In Jenkins log I can see following messages: May 13 10:57:18 rambo jenkins[743]: INFO: Bitbucket notify on start May 13 10:57:19 rambo jenkins[743]: May 13, 2016 10:57:19 AM org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier notifyBuildStatus May 13 10:57:19 rambo jenkins[743]: INFO: This response was received:{"error": {"fields": {"url": ["Enter a valid URL."]} , "message": "Bad request"}} May 13 10:57:19 rambo jenkins[743]: May 13, 2016 10:57:19 AM org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier prebuild May 13 10:57:19 rambo jenkins[743]: INFO: Bitbucket notify on start succeeded Any idea what has been configured wrong? Note: our J