Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from Flagbit/flagbit-33901
Fix JENKINS-33901 add support for ssh on 443 port
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/org/jenkinsci/plugins/bitbucket/validator/BitbucketHostValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.jenkinsci.plugins.bitbucket.validator; | ||
|
||
import com.google.common.collect.ImmutableSet; | ||
import java.util.Set; | ||
|
||
public class BitbucketHostValidator | ||
{ | ||
final Set<String> supportedDomains = ImmutableSet.of("bitbucket.org", "altssh.bitbucket.org"); | ||
|
||
public boolean isValid(final String $value) | ||
{ | ||
return this.supportedDomains.contains($value); | ||
} | ||
|
||
public String renderError() | ||
{ | ||
return "Bitbucket build notifier support only repositories hosted in bitbucket.org"; | ||
} | ||
} |