[JIRA] [bitbucket-build-status-notifier-plugin] (JENKINS-33901) Bitbucket notifier plugin does not support SSH on port 443

2 views
Skip to first unread message

jp.delimat@gmail.com (JIRA)

unread,
Mar 30, 2016, 9:37:02 AM3/30/16
to jenkinsc...@googlegroups.com
Jean-Paul Delimat created an issue
 
Jenkins / Bug JENKINS-33901
Bitbucket notifier plugin does not support SSH on port 443
Issue Type: Bug Bug
Assignee: Antonio Mansilla
Components: bitbucket-build-status-notifier-plugin
Created: 2016/Mar/30 1:36 PM
Environment: Plugin org.jenkins-ci.plugins:bitbucket-build-status-notifier:1.1.0
Priority: Minor Minor
Reporter: Jean-Paul Delimat

On some servers the outgoing traffic on port 22 is blocked and BitBucket supports that by providing an alternative URL scheme. See section "SSH on Port 443" at the bottom of this page.

So the URL looks like this: ssh://g...@altssh.bitbucket.org:443/accountname/reponame/

The plugin throws an error like this:

itbucket notify on start failed: Bitbucket build notifier support only repositories hosted in bitbucket.org
java.lang.Exception: Bitbucket build notifier support only repositories hosted in bitbucket.org
at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.createBuildStatusResourceFromBuild(BitbucketBuildStatusNotifier.java:183)
at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.notifyBuildStatus(BitbucketBuildStatusNotifier.java:215)
at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.prebuild(BitbucketBuildStatusNotifier.java:85)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:799)
at hudson.model.Build$BuildExecution.doRun(Build.java:142)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
at hudson.model.Run.execute(Run.java:1759)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)

It seems to be consistent with the code: https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/blob/master/src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java#L182

I've tried to replace the line above by something like (probably better to define a list of allowed URLs and check if the host is in it though):

URIish urIish = scmAdapter.getRepositoryUri();
if (!urIish.getHost().equals("bitbucket.org") &&
!urIish.getHost().equals("altssh.bitbucket.org") &&
!urIish.getHost().equals("altssh.bitbucket.org:443"))

{ throw new Exception("Bitbucket build notifier support only repositories hosted in bitbucket.org"); }

But I'm not allowed to push to the repo. Could you fix this?

Thanks in advance!

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

antonio.mansilla@flagbit.de (JIRA)

unread,
May 6, 2016, 9:05:01 AM5/6/16
to jenkinsc...@googlegroups.com
Antonio Mansilla started work on Bug JENKINS-33901
 
Change By: Antonio Mansilla
Status: Open In Progress

antonio.mansilla@flagbit.de (JIRA)

unread,
May 6, 2016, 9:06:01 AM5/6/16
to jenkinsc...@googlegroups.com
Antonio Mansilla commented on Bug JENKINS-33901
 
Re: Bitbucket notifier plugin does not support SSH on port 443

Thanks for reporting this bug Jean-Paul Delimat. I'm already working for solving this issue.

scm_issue_link@java.net (JIRA)

unread,
May 6, 2016, 10:53:01 AM5/6/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Antonio Mansilla
Path:
src/main/java/org/jenkinsci/plugins/bitbucket/validator/BitbucketHostValidator.java
http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/ed13d4f626438c7258386ad824c720db160dafed
Log:
JENKINS-33901 Add bitbucket host validator

scm_issue_link@java.net (JIRA)

unread,
May 6, 2016, 10:53:02 AM5/6/16
to jenkinsc...@googlegroups.com

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/feba62bf0558c7bb46118b66e9863cd479ffaa77
Log:
JENKINS-33901 Add support for bitbucket ssh on port 443

Usable on servers where the outgoing traffic on port 22 is blocked
and bitbucket supports that by providing an alternative URL scheme.

More info: https://confluence.atlassian.com/bitbucket/use-the-ssh-protocol-with-bitbucket-cloud-221449711.html#UsetheSSHprotocolwithBitbucketCloud-SSHonPort443

scm_issue_link@java.net (JIRA)

unread,
May 6, 2016, 10:53:02 AM5/6/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Antonio Mansilla
Path:
src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusNotifier.java

src/main/java/org/jenkinsci/plugins/bitbucket/validator/BitbucketHostValidator.java
http://jenkins-ci.org/commit/bitbucket-build-status-notifier-plugin/66a0a89267653818d55c0276a6a98b365b04206e
Log:
Merge pull request #20 from Flagbit/flagbit-33901

Fix JENKINS-33901 add support for ssh on 443 port

Compare: https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin/compare/ed69c7dcdd31...66a0a8926765

antonio.mansilla@flagbit.de (JIRA)

unread,
May 6, 2016, 11:06:02 AM5/6/16
to jenkinsc...@googlegroups.com

Hi again Jean-Paul Delimat, I've fixed the bug and now your use case is supported. This changes will be available in the next plugin release.

antonio.mansilla@flagbit.de (JIRA)

unread,
May 6, 2016, 11:06:04 AM5/6/16
to jenkinsc...@googlegroups.com
Antonio Mansilla resolved as Fixed
 
Change By: Antonio Mansilla
Status: In Progress Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages