aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java9
-rw-r--r--src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilter.html31
-rw-r--r--src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilterBySCMIncludes.html10
-rw-r--r--src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-ciSkipPhrases.html5
4 files changed, 39 insertions, 16 deletions
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java
index 7025396..759c696 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java
@@ -5,6 +5,7 @@ import org.apache.commons.httpclient.auth.AuthScope;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.DeleteMethod;
+import org.apache.commons.httpclient.params.HttpClientParams;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.type.TypeFactory;
import org.codehaus.jackson.type.JavaType;
@@ -45,10 +46,16 @@ public class ApiClient {
public static final byte MAX_KEY_SIZE_BB_API = 40;
public static class HttpClientFactory {
- public static final HttpClientFactory INSTANCE = new HttpClientFactory();
+ public static final HttpClientFactory INSTANCE = new HttpClientFactory();
+ private static final int DEFAULT_TIMEOUT = 60000;
public HttpClient getInstanceHttpClient() {
HttpClient client = new HttpClient();
+
+ HttpClientParams params = client.getParams();
+ params.setConnectionManagerTimeout(DEFAULT_TIMEOUT);
+ params.setSoTimeout(DEFAULT_TIMEOUT);
+
if (Jenkins.getInstance() == null) return client;
ProxyConfiguration proxy = Jenkins.getInstance().proxy;
diff --git a/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilter.html b/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilter.html
index 88af799..30e5f5e 100644
--- a/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilter.html
+++ b/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilter.html
@@ -1,12 +1,19 @@
-Filter option in custom format. Default value is empty or "any".
-Available formats:
-* any pull requests applied for this project: "any", "*" or empty string.
-* filtered by destination branch: "my-branch" or more complex reg-ex filter "r:^master" (must be started with "r:" and case insensitive match).
-* filtered by source and destination branches: "s:source-branch d:dest-branch"
-* filtered by source and destination branches with regex: "s:r:^feature d:r:master$"
-* filtered by many destination/source branches: "s:one s:two s:three d:master d:r:master$"
-* filtered by many sources branches: "s:one s:two s:r:^three d:"
-When you using format with source branch filter "s" or destination filter "d", you must cpecify great than one source and destination filter, eg "s:1 s:2 s:... d:".
-Any sources and any destinations for pull request:
-* filter string: "*"
-* filter string: "s: d:"
+<div>
+ Filter option in custom format. Default value is empty or <tt>any</tt>.<br/>
+ Available formats:
+ <ul>
+ <li>any pull requests applied for this project: <tt>any</tt>, <tt>*</tt> or empty string</li>
+ <li>filtered by destination branch: <tt>my-branch</tt> or more complex reg-ex filter <tt>r:^master</tt> (must be started with <tt>r:</tt> and case insensitive match).</li>
+ <li>filtered by source and destination branches: <tt>s:source-branch d:dest-branch</tt></li>
+ <li>filtered by source and destination branches with regex: <tt>s:r:^feature d:r:master$</tt></li>
+ <li>filtered by many destination/source branches: <tt>s:one s:two s:three d:master d:r:master$</tt></li>
+ <li>filtered by many sources branches: <tt>s:one s:two s:r:^three d:</tt></li>
+ </ul>
+ <p/>
+ When you using format with source branch filter <tt>s</tt> or destination filter <tt>d</tt>, you must specify great than one source and destination filter, eg <tt>s:1 s:2 s:... d:</tt>.<br/>
+ Any sources and any destinations for pull request:
+ <ul>
+ <li>filter string: <tt>*</tt></li>
+ <li>filter string: <tt>s: d:</tt></li>
+ </ul>
+</div>
diff --git a/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilterBySCMIncludes.html b/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilterBySCMIncludes.html
index 3f24419..cc9d47c 100644
--- a/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilterBySCMIncludes.html
+++ b/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-branchesFilterBySCMIncludes.html
@@ -1,3 +1,7 @@
-It is sugar-option for synchronize option "BranchesFilter" to Git SCM option "Branches to build" without manual editing.
-Check this option suppose than your "BranchesFilter" field has logick equal value with Git SCM "Branches to build" option (original value from "BranchesFilter" field will e ignored).
-If "Branches to build" option has values "*/master */feature-master */build-with-jenkins", then "BranchesFilter" field will have value "d:master d:feature-master d:build-with-jenkins".
+Uses the Git SCM option "Branches to build" option as the value for
+"BranchesFilter". If the "BranchesFilter" field itself has any content,
+it will be ignored.
+<br>
+If the "Branches to build" option has values
+"*/master */feature-master */build-with-jenkins", then "BranchesFilter"
+field will have value "d:master d:feature-master d:build-with-jenkins".
diff --git a/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-ciSkipPhrases.html b/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-ciSkipPhrases.html
new file mode 100644
index 0000000..f30f306
--- /dev/null
+++ b/src/main/resources/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger/help-ciSkipPhrases.html
@@ -0,0 +1,5 @@
+A comma-separated list of strings to search the pull request title for.
+<br>
+e.g. If set to "trivial,[skiptest]", any PRs containing either "trivial" or
+"[skiptest]" (case-insensitive) will not be built.
+