Skip to content

Commit

Permalink
[JENKINS-33901] Add support for bitbucket ssh on port 443
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Antonio Mansilla committed May 6, 2016
1 parent ed13d4f commit feba62b
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -44,6 +44,7 @@
import org.jenkinsci.plugins.bitbucket.model.BitbucketBuildStatus;
import org.jenkinsci.plugins.bitbucket.model.BitbucketBuildStatusResource;
import org.jenkinsci.plugins.bitbucket.model.BitbucketBuildStatusSerializer;
import org.jenkinsci.plugins.bitbucket.validator.BitbucketHostValidator;
import org.jenkinsci.plugins.multiplescms.MultiSCM;
import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.DataBoundConstructor;
Expand All @@ -54,6 +55,7 @@
public class BitbucketBuildStatusNotifier extends Notifier {

private static final Logger logger = Logger.getLogger(BitbucketBuildStatusNotifier.class.getName());
private static final BitbucketHostValidator hostValidator = new BitbucketHostValidator();

private boolean notifyStart;
private boolean notifyFinish;
Expand Down Expand Up @@ -193,8 +195,8 @@ private List<BitbucketBuildStatusResource> createBuildStatusResources(final Abst

// if repo is not hosted in bitbucket.org then log it and remove repo from being notified
URIish repoUri = commitRepoPair.getValue();
if (!repoUri.getHost().equals("bitbucket.org")) {
logger.log(Level.INFO, "Bitbucket build notifier support only repositories hosted in bitbucket.org");
if (!hostValidator.isValid(repoUri.getHost())) {
logger.log(Level.INFO, hostValidator.renderError());
continue;
}

Expand Down

0 comments on commit feba62b

Please sign in to comment.