From 16e24521d12e5b32775dcc9029557f0e492a608a Mon Sep 17 00:00:00 2001 From: Lee Date: Thu, 7 Jul 2022 23:07:27 +0200 Subject: [PATCH 01/21] global.jelly updated with proxy fields --- .../office365connector/Webhook/global.jelly | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly b/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly index 09b3ecb..5b61d78 100755 --- a/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly @@ -7,5 +7,24 @@ + + + + This section defines global proxy settings that will apply to all webhook messages + + + + + + + + + + + + + + + From 94cd34b7bd694ddaf816cbc69aa956b7aa418e8a Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 12 Jul 2022 22:23:36 +0200 Subject: [PATCH 02/21] Adding plugin specific proxy support for Office365Connector --- pom.xml | 2 +- .../office365connector/HttpWorker.java | 19 ++++-- .../Office365ConnectorWebhookNotifier.java | 2 +- .../plugins/office365connector/Proxy.java | 58 +++++++++++++++++++ .../plugins/office365connector/Webhook.java | 50 ++++++++++++++++ .../office365connector/Webhook/config.jelly | 2 +- .../office365connector/Webhook/global.jelly | 3 +- .../office365connector/Webhook/help-ip.html | 1 + .../office365connector/Webhook/help-port.html | 1 + .../Webhook/help-username.html | 1 + 10 files changed, 130 insertions(+), 9 deletions(-) create mode 100644 src/main/java/jenkins/plugins/office365connector/Proxy.java create mode 100644 src/main/resources/jenkins/plugins/office365connector/Webhook/help-ip.html create mode 100644 src/main/resources/jenkins/plugins/office365connector/Webhook/help-port.html create mode 100644 src/main/resources/jenkins/plugins/office365connector/Webhook/help-username.html diff --git a/pom.xml b/pom.xml index 5e51d63..a4f0874 100644 --- a/pom.xml +++ b/pom.xml @@ -143,7 +143,7 @@ org.jenkins-ci.tools maven-hpi-plugin - 3.5 + 3.17 InjectionIT diff --git a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java index 504e0a8..e75da5f 100644 --- a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java +++ b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java @@ -13,9 +13,7 @@ */ package jenkins.plugins.office365connector; -import java.io.IOException; import java.io.PrintStream; -import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.util.List; import java.util.concurrent.ExecutorService; @@ -43,17 +41,20 @@ public class HttpWorker implements Runnable { private final PrintStream logger; + private final Proxy pluginProxy; + private final String url; private final String data; private final int timeout; private static final int RETRIES = 3; - public HttpWorker(String url, String data, int timeout, PrintStream logger) { + public HttpWorker(String url, String data, int timeout, PrintStream logger, Proxy pluginProxy) { this.url = url; this.data = data; this.timeout = timeout; this.logger = logger; + this.pluginProxy = pluginProxy; } /** @@ -75,7 +76,7 @@ public void run() { // uncomment to log what message has been sent // log("Posted JSON: %s", data); requestEntity = new StringRequestEntity(data, "application/json", StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { + } catch (Exception e) { e.printStackTrace(logger); break; } @@ -92,7 +93,7 @@ public void run() { } else { success = true; } - } catch (IOException e) { + } catch (Exception e) { log("Failed to post data to webhook - %s", url); e.printStackTrace(logger); } finally { @@ -105,8 +106,16 @@ public void run() { private HttpClient getHttpClient() { HttpClient client = new HttpClient(); Jenkins jenkins = Jenkins.get(); + if (pluginProxy.proxyConfigured()) { + client.getHostConfiguration().setProxy(pluginProxy.getIp(), pluginProxy.getPort()); + if (StringUtils.isNotBlank(pluginProxy.getUsername())) { + client.getState().setProxyCredentials(AuthScope.ANY, + new UsernamePasswordCredentials(pluginProxy.getUsername(), pluginProxy.getPassword())); + } + } if (jenkins != null) { ProxyConfiguration proxy = jenkins.proxy; + // Check job proxy first if (proxy != null) { List noHostProxyPatterns = proxy.getNoProxyHostPatterns(); if (!isNoProxyHost(this.url, noHostProxyPatterns)) { diff --git a/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java b/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java index 2c9cbd1..ce9738f 100644 --- a/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java +++ b/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java @@ -112,7 +112,7 @@ private void executeWorker(Webhook webhook, Card card) { try { String url = run.getEnvironment(taskListener).expand(webhook.getUrl()); String data = gson.toJson(card); - HttpWorker worker = new HttpWorker(url, data, webhook.getTimeout(), taskListener.getLogger()); + HttpWorker worker = new HttpWorker(url, data, webhook.getTimeout(), taskListener.getLogger(), webhook.getPluginProxy()); worker.submit(); } catch (IOException | InterruptedException | RejectedExecutionException e) { log(String.format("Failed to notify webhook: %s", webhook.getName())); diff --git a/src/main/java/jenkins/plugins/office365connector/Proxy.java b/src/main/java/jenkins/plugins/office365connector/Proxy.java new file mode 100644 index 0000000..5f99ac0 --- /dev/null +++ b/src/main/java/jenkins/plugins/office365connector/Proxy.java @@ -0,0 +1,58 @@ +package jenkins.plugins.office365connector; + +public class Proxy { + + private String ip; + private Integer port; + private String username; + private String password; + + + public Proxy(String ip, Integer port, String username, String password) { + this.ip = ip; + this.port = port; + this.username = username; + this.password = password; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public Boolean proxyConfigured() { + try { + return (!this.ip.equals(null) || !this.ip.equals("")); + + } catch (NullPointerException ex) { + return false; + } + } +} diff --git a/src/main/java/jenkins/plugins/office365connector/Webhook.java b/src/main/java/jenkins/plugins/office365connector/Webhook.java index e26b686..c94e390 100644 --- a/src/main/java/jenkins/plugins/office365connector/Webhook.java +++ b/src/main/java/jenkins/plugins/office365connector/Webhook.java @@ -72,6 +72,10 @@ public String getName() { return Util.fixEmptyAndTrim(StringUtils.isEmpty(name) ? getDescriptor().getGlobalName() : name); } + public Proxy getPluginProxy() { + return getDescriptor().proxyPluginConfiguration(); + } + @DataBoundSetter public void setName(String name) { this.name = Util.fixEmptyAndTrim(name); @@ -183,16 +187,62 @@ public static class DescriptorImpl extends Descriptor { private String globalUrl; private String globalName; + private String proxyIp; + private String proxyUsername; + private String proxyPassword; + + private int proxyPort; + public DescriptorImpl() { load(); } + public Proxy proxyPluginConfiguration() { + return new Proxy(this.proxyIp, this.proxyPort, this.proxyUsername, this.proxyPassword); + } + @Nonnull @Override public String getDisplayName() { return "Webhook"; } + public String getProxyIp() { + return proxyIp; + } + + @DataBoundSetter + public void setProxyIp(String proxyIp) { + this.proxyIp = proxyIp; + } + + public String getProxyUsername() { + return proxyUsername; + } + + @DataBoundSetter + public void setProxyUsername(String proxyUsername) { + this.proxyUsername = proxyUsername; + } + + public String getProxyPassword() { + return proxyPassword; + } + + @DataBoundSetter + public void setProxyPassword(String proxyPassword) { + this.proxyPassword = proxyPassword; + } + + public int getProxyPort() { + return proxyPort; + } + + @DataBoundSetter + public void setProxyPort(int proxyPort) { + this.proxyPort = proxyPort; + } + public int getDefaultTimeout() { return Webhook.DEFAULT_TIMEOUT; } diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/config.jelly b/src/main/resources/jenkins/plugins/office365connector/Webhook/config.jelly index 6917e9a..71e421b 100644 --- a/src/main/resources/jenkins/plugins/office365connector/Webhook/config.jelly +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/config.jelly @@ -14,7 +14,7 @@ This section defines for which build statuses the notification is sent. - + diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly b/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly index 5b61d78..f4ebda3 100755 --- a/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly @@ -10,7 +10,8 @@ - This section defines global proxy settings that will apply to all webhook messages + This section defines the Office365Connector proxy settings that will apply to all webhook notifications. This + proxy configuration will be prioritized over the Jenkins global proxy config diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/help-ip.html b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-ip.html new file mode 100644 index 0000000..a62c127 --- /dev/null +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-ip.html @@ -0,0 +1 @@ +
The IP address of the proxy server
diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/help-port.html b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-port.html new file mode 100644 index 0000000..75e11bd --- /dev/null +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-port.html @@ -0,0 +1 @@ +
This field works in conjunction with the ip field to specify the HTTP proxy port.
diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/help-username.html b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-username.html new file mode 100644 index 0000000..ee67c43 --- /dev/null +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-username.html @@ -0,0 +1 @@ +
This field works in conjunction with the proxy server field to specify the username used to authenticate with the proxy.
From eef318ee755121d3cded3cfef87715d467ca9bf1 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 12 Jul 2022 22:24:04 +0200 Subject: [PATCH 03/21] Fixing tests --- .../office365connector/HttpWorkerTest.java | 35 ++++++++++--- .../plugins/office365connector/ProxyTest.java | 49 +++++++++++++++++++ 2 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 src/test/java/jenkins/plugins/office365connector/ProxyTest.java diff --git a/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java b/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java index 7b9039f..67b890a 100644 --- a/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java +++ b/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java @@ -33,11 +33,12 @@ public void setUp() { } @Test - public void HttpWorker_getHttpClient_NoProxy() throws NoSuchMethodException { + public void HttpWorker_getHttpClient_NoJenkinsProxy() throws NoSuchMethodException { // given // from @Before - HttpWorker httpWorker = new HttpWorker("http://127.0.0.1", "{}", 30, System.out); + Proxy thisPluginProxy = new Proxy(null, null, null, null); + HttpWorker httpWorker = new HttpWorker("http://127.0.0.1", "{}", 30, System.out, thisPluginProxy); Method method = HttpWorker.class.getDeclaredMethod("getHttpClient"); method.setAccessible(true); @@ -50,15 +51,16 @@ public void HttpWorker_getHttpClient_NoProxy() throws NoSuchMethodException { } @Test - public void HttpWorker_getHttpClient_Proxy() throws NoSuchMethodException { + public void HttpWorker_getHttpClient_JenkinsProxy() throws NoSuchMethodException { // given // from @Before + Proxy thisPluginProxy = new Proxy(null, null, null, null); Jenkins jenkins = Jenkins.get(); ProxyConfiguration proxyConfiguration = new ProxyConfiguration("name", 123, null, null, "*mockwebsite.com*"); jenkins.proxy = proxyConfiguration; - HttpWorker httpWorker = new HttpWorker("http://127.0.0.1", "{}", 30, System.out); + HttpWorker httpWorker = new HttpWorker("http://127.0.0.1", "{}", 30, System.out, thisPluginProxy); Method method = HttpWorker.class.getDeclaredMethod("getHttpClient"); method.setAccessible(true); @@ -71,15 +73,16 @@ public void HttpWorker_getHttpClient_Proxy() throws NoSuchMethodException { } @Test - public void HttpWorker_getHttpClient_Proxy_Ignored() throws NoSuchMethodException { + public void HttpWorker_getHttpClient_JenkinsProxy_Ignored() throws NoSuchMethodException { // given // from @Before + Proxy thisPluginProxy = new Proxy(null, null, null, null); Jenkins jenkins = Jenkins.get(); ProxyConfiguration proxyConfiguration = new ProxyConfiguration("name", 123, null, null, "*mockwebsite.com*"); jenkins.proxy = proxyConfiguration; - HttpWorker httpWorker = new HttpWorker("http://mockwebsite.com", "{}", 30, System.out); + HttpWorker httpWorker = new HttpWorker("http://mockwebsite.com", "{}", 30, System.out, thisPluginProxy); Method method = HttpWorker.class.getDeclaredMethod("getHttpClient"); method.setAccessible(true); @@ -90,4 +93,22 @@ public void HttpWorker_getHttpClient_Proxy_Ignored() throws NoSuchMethodExceptio assertThat(httpClient.getHostConfiguration().getProxyHost()).isNull(); assertThat(httpClient.getHostConfiguration().getProxyPort()).isEqualTo(-1); } -} + + @Test + public void HttpWorker_getHttpClient_PluginProxy() throws NoSuchMethodException { + + // given + // from @Before + Proxy thisPluginProxy = new Proxy("10.0.0.1", 12345, null, null); + HttpWorker httpWorker = new HttpWorker("http://127.0.0.1", "{}", 30, System.out, thisPluginProxy); + Method method = HttpWorker.class.getDeclaredMethod("getHttpClient"); + method.setAccessible(true); + + // when + HttpClient httpClient = (HttpClient) ReflectionUtils.invokeMethod(method, httpWorker); + + // then + assertThat(httpClient.getHostConfiguration().getProxyHost()).isEqualTo(thisPluginProxy.getIp()); + assertThat(httpClient.getHostConfiguration().getProxyPort()).isEqualTo(thisPluginProxy.getPort()); + } +} \ No newline at end of file diff --git a/src/test/java/jenkins/plugins/office365connector/ProxyTest.java b/src/test/java/jenkins/plugins/office365connector/ProxyTest.java new file mode 100644 index 0000000..83a5945 --- /dev/null +++ b/src/test/java/jenkins/plugins/office365connector/ProxyTest.java @@ -0,0 +1,49 @@ +package jenkins.plugins.office365connector; + +import junit.framework.TestCase; +import org.junit.Before; +import org.junit.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +public class ProxyTest { + + private Proxy proxyTest; + private Proxy proxyTestNoCredentials; + + @Before + public void setUp() { + proxyTest = new Proxy("10.0.0.1", 65654, "myUsername", "myPassword"); + proxyTestNoCredentials = new Proxy("10.0.0.1", 65654, null, null); + } + + @Test + public void getIp() { + assertThat("10.0.0.1").isEqualTo(proxyTest.getIp()); + } + + @Test + public void getPort() { + assertThat(65654).isEqualTo(proxyTest.getPort()); + } + + @Test + public void getUsername() { + assertThat("myUsername").isEqualTo(proxyTest.getUsername()); + } + + @Test + public void getPassword() { + assertThat("myPassword").isEqualTo(proxyTest.getPassword()); + } + + @Test + public void proxyConfigured_True() { + assertThat(proxyTest.proxyConfigured().equals(true)); + } + + @Test + public void proxyConfigured_False() { + assertThat(proxyTest.proxyConfigured().equals(false)); + } +} \ No newline at end of file From bd50cf8ce0394ae1005fc4aa6df7703ee500cb0d Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 13 Jul 2022 12:01:25 +0200 Subject: [PATCH 04/21] Added mock for DescriptorImpl to support changes in Webhook.java constructor --- .../plugins/office365connector/Webhook.java | 13 ++++++++----- .../office365connector/WebhookTest.java | 17 +++++++++++++++++ .../workflow/DevelopersIT.java | 17 +++++++++++++---- .../workflow/PullRequestIT.java | 15 +++++++-------- .../office365connector/workflow/SampleIT.java | 13 ++++++------- .../workflow/WebhookJobPropertyTest.java | 19 +++++++++++++++++-- 6 files changed, 68 insertions(+), 26 deletions(-) diff --git a/src/main/java/jenkins/plugins/office365connector/Webhook.java b/src/main/java/jenkins/plugins/office365connector/Webhook.java index c94e390..b83fe17 100644 --- a/src/main/java/jenkins/plugins/office365connector/Webhook.java +++ b/src/main/java/jenkins/plugins/office365connector/Webhook.java @@ -50,6 +50,8 @@ public class Webhook extends AbstractDescribableImpl { private int timeout; + private Proxy pluginProxy; + private List macros = Collections.emptyList(); private List factDefinitions = Collections.emptyList(); @@ -62,6 +64,7 @@ public DescriptorImpl getDescriptor() { @DataBoundConstructor public Webhook(String url) { this.url = StringUtils.isEmpty(url) ? getDescriptor().getGlobalUrl() : url; + this.setProxyPluginConfiguration(getDescriptor().getProxyIp(), getDescriptor().getProxyPort(), getDescriptor().getProxyUsername(), getDescriptor().getProxyPassword()); } public String getUrl() { @@ -73,7 +76,11 @@ public String getName() { } public Proxy getPluginProxy() { - return getDescriptor().proxyPluginConfiguration(); + return this.pluginProxy; + } + + public void setProxyPluginConfiguration(String proxyIp, Integer proxyPort, String proxyUsername, String proxyPassword) { + this.pluginProxy = new Proxy(proxyIp, proxyPort, proxyUsername, proxyPassword); } @DataBoundSetter @@ -197,10 +204,6 @@ public DescriptorImpl() { load(); } - public Proxy proxyPluginConfiguration() { - return new Proxy(this.proxyIp, this.proxyPort, this.proxyUsername, this.proxyPassword); - } - @Nonnull @Override public String getDisplayName() { diff --git a/src/test/java/jenkins/plugins/office365connector/WebhookTest.java b/src/test/java/jenkins/plugins/office365connector/WebhookTest.java index 9bdd45d..e4beb19 100644 --- a/src/test/java/jenkins/plugins/office365connector/WebhookTest.java +++ b/src/test/java/jenkins/plugins/office365connector/WebhookTest.java @@ -2,16 +2,23 @@ import java.util.Arrays; import java.util.List; + +import hudson.model.AbstractBuild; +import hudson.model.Job; +import hudson.model.Result; import jenkins.model.Jenkins; import jenkins.plugins.office365connector.model.FactDefinition; import jenkins.plugins.office365connector.model.Macro; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.Mockito; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Matchers.anyObject; import static org.powermock.api.mockito.PowerMockito.mock; import static org.powermock.api.mockito.PowerMockito.mockStatic; import static org.powermock.api.mockito.PowerMockito.when; @@ -23,6 +30,16 @@ @RunWith(PowerMockRunner.class) @PrepareForTest(Jenkins.class) public class WebhookTest { + @Before + public void setUp() throws Exception { + + Webhook.DescriptorImpl mockDescriptor = mock(Webhook.DescriptorImpl.class); + + Jenkins jenkins = mock(Jenkins.class); + mockStatic(Jenkins.class); + Mockito.when(Jenkins.get()).thenReturn(jenkins); + Mockito.when(jenkins.getDescriptorOrDie(anyObject())).thenReturn(mockDescriptor); + } @Test public void getUrl_ReturnsUrl() { diff --git a/src/test/java/jenkins/plugins/office365connector/workflow/DevelopersIT.java b/src/test/java/jenkins/plugins/office365connector/workflow/DevelopersIT.java index e4340c5..63604a4 100644 --- a/src/test/java/jenkins/plugins/office365connector/workflow/DevelopersIT.java +++ b/src/test/java/jenkins/plugins/office365connector/workflow/DevelopersIT.java @@ -1,15 +1,14 @@ package jenkins.plugins.office365connector.workflow; -import static org.powermock.api.mockito.PowerMockito.mock; -import static org.powermock.api.mockito.PowerMockito.when; - import java.util.List; import hudson.model.AbstractBuild; import hudson.model.Job; import hudson.scm.ChangeLogSet; +import jenkins.model.Jenkins; import jenkins.plugins.office365connector.FileUtils; import jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier; +import jenkins.plugins.office365connector.Webhook; import jenkins.plugins.office365connector.helpers.AffectedFileBuilder; import org.junit.Before; import org.junit.Test; @@ -18,12 +17,14 @@ import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; +import static org.powermock.api.mockito.PowerMockito.*; + /** * @author Damian Szczepanik (damianszczepanik@github) */ @PowerMockIgnore("jdk.internal.reflect.*") @RunWith(PowerMockRunner.class) -@PrepareForTest(Office365ConnectorWebhookNotifier.class) +@PrepareForTest({Office365ConnectorWebhookNotifier.class, Jenkins.class}) public class DevelopersIT extends AbstractTest { private static final String JOB_NAME = "simple job"; @@ -31,8 +32,16 @@ public class DevelopersIT extends AbstractTest { @Before public void setUp() { + Webhook.DescriptorImpl mockDescriptor = mock(Webhook.DescriptorImpl.class); + when(mockDescriptor.getName()).thenReturn("testName"); + + mockStatic(Jenkins.class); + Jenkins jenkins = mock(Jenkins.class); mockListener(); + when(jenkins.getDescriptorOrDie(Webhook.class)).thenReturn(mockDescriptor); + when(Jenkins.get()).thenReturn(jenkins); + run = mockRun(); mockDisplayURLProvider(JOB_NAME, BUILD_NUMBER); diff --git a/src/test/java/jenkins/plugins/office365connector/workflow/PullRequestIT.java b/src/test/java/jenkins/plugins/office365connector/workflow/PullRequestIT.java index 1821add..4c68c6c 100644 --- a/src/test/java/jenkins/plugins/office365connector/workflow/PullRequestIT.java +++ b/src/test/java/jenkins/plugins/office365connector/workflow/PullRequestIT.java @@ -47,10 +47,17 @@ public class PullRequestIT extends AbstractTest { @Before public void setUp() { + + Webhook.DescriptorImpl mockDescriptor = mock(Webhook.DescriptorImpl.class); + when(mockDescriptor.getName()).thenReturn("testName"); + mockStatic(Jenkins.class); Jenkins jenkins = mock(Jenkins.class); mockListener(); + when(jenkins.getDescriptorOrDie(Webhook.class)).thenReturn(mockDescriptor); + when(Jenkins.get()).thenReturn(jenkins); + run = mockRun(); mockCause("Branch indexing"); mockCommitters(); @@ -59,15 +66,7 @@ public void setUp() { mockEnvironment(); mockHttpWorker(); mockGetChangeSets(); - mockPullRequest(); - - when(Jenkins.get()).thenReturn(jenkins); - - Webhook.DescriptorImpl mockDescriptor = mock(Webhook.DescriptorImpl.class); - when(mockDescriptor.getName()).thenReturn("testName"); - - when(jenkins.getDescriptorOrDie(Webhook.class)).thenReturn(mockDescriptor); } private AbstractBuild mockRun() { diff --git a/src/test/java/jenkins/plugins/office365connector/workflow/SampleIT.java b/src/test/java/jenkins/plugins/office365connector/workflow/SampleIT.java index cd06d2e..8ff6e71 100644 --- a/src/test/java/jenkins/plugins/office365connector/workflow/SampleIT.java +++ b/src/test/java/jenkins/plugins/office365connector/workflow/SampleIT.java @@ -41,10 +41,16 @@ public class SampleIT extends AbstractTest { @Before public void setUp() { + Webhook.DescriptorImpl mockDescriptor = mock(Webhook.DescriptorImpl.class); + when(mockDescriptor.getName()).thenReturn("testName"); + mockStatic(Jenkins.class); Jenkins jenkins = mock(Jenkins.class); mockListener(); + when(jenkins.getDescriptorOrDie(Webhook.class)).thenReturn(mockDescriptor); + when(Jenkins.get()).thenReturn(jenkins); + run = mockRun(); mockCause(CAUSE_DESCRIPTION); @@ -52,13 +58,6 @@ public void setUp() { mockEnvironment(); mockHttpWorker(); mockGetChangeSets(); - - when(Jenkins.get()).thenReturn(jenkins); - - Webhook.DescriptorImpl mockDescriptor = mock(Webhook.DescriptorImpl.class); - when(mockDescriptor.getName()).thenReturn("testName"); - - when(jenkins.getDescriptorOrDie(Webhook.class)).thenReturn(mockDescriptor); } private AbstractBuild mockRun() { diff --git a/src/test/java/jenkins/plugins/office365connector/workflow/WebhookJobPropertyTest.java b/src/test/java/jenkins/plugins/office365connector/workflow/WebhookJobPropertyTest.java index ac28719..6d43b93 100644 --- a/src/test/java/jenkins/plugins/office365connector/workflow/WebhookJobPropertyTest.java +++ b/src/test/java/jenkins/plugins/office365connector/workflow/WebhookJobPropertyTest.java @@ -1,16 +1,19 @@ package jenkins.plugins.office365connector.workflow; import static org.assertj.core.api.Assertions.assertThat; -import static org.powermock.api.mockito.PowerMockito.mock; +import static org.powermock.api.mockito.PowerMockito.*; +import static org.powermock.api.mockito.PowerMockito.when; import java.util.Collections; import java.util.List; import hudson.model.AbstractBuild; +import jenkins.model.Jenkins; import jenkins.plugins.office365connector.Office365ConnectorWebhookNotifier; import jenkins.plugins.office365connector.Webhook; import jenkins.plugins.office365connector.WebhookJobProperty; import jenkins.plugins.office365connector.helpers.WebhookBuilder; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.powermock.core.classloader.annotations.PowerMockIgnore; @@ -22,9 +25,21 @@ */ @PowerMockIgnore("jdk.internal.reflect.*") @RunWith(PowerMockRunner.class) -@PrepareForTest({Office365ConnectorWebhookNotifier.class, WebhookJobProperty.class}) +@PrepareForTest({Office365ConnectorWebhookNotifier.class, WebhookJobProperty.class, Jenkins.class}) public class WebhookJobPropertyTest extends AbstractTest { + @Before + public void setUp() { + Webhook.DescriptorImpl mockDescriptor = mock(Webhook.DescriptorImpl.class); + when(mockDescriptor.getName()).thenReturn("testName"); + + mockStatic(Jenkins.class); + Jenkins jenkins = mock(Jenkins.class); + mockListener(); + + when(jenkins.getDescriptorOrDie(Webhook.class)).thenReturn(mockDescriptor); + when(Jenkins.get()).thenReturn(jenkins); + } @Test public void getWebhooks_ReturnsHook() { From 2bce0d1a0c7079994afe5f25e1f0b4defc970139 Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 13 Jul 2022 12:46:45 +0200 Subject: [PATCH 05/21] Updated screenshot for README.md --- .README/globalconfig.png | Bin 12079 -> 25652 bytes README.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.README/globalconfig.png b/.README/globalconfig.png index 5307e8ef779c186f0fa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GlgU)h{In-3Z32igN{l4Zv z>#sreoa$1h#R&tuUp`yfiCeLPxVl0S<2`96!8vwzYbW zT6pG95f$=m&~PQgl502SD<#o~x7#38QDogyr`T?S`Snzini_tOJXKb5)<;dJRvJCo z`ZqCewzo=0wl)50MLgo_&?MXMpdt``UC+L5U6aaL6h93HjTh)dkwI{9c#h+Q#?0~> zik*S8A?n#L5%vYN|Bau0s9GK5_w~$5Tw|2p$Lc&KSWz!t-;J7=@^+0q_llF#k6j!Q zrl1x>_L=0%F+K=i7cVLo0X}(DV9B#f*xgd_9kY9@bm$3h%j^1Q;sOM6br_SF8ZAISDh`MF~RR z-vMA?U_jEOt++SJsu9(yk^`0k%^?3P^{V~<)ppbN0uzver0PRYVxBvhE diff --git a/README.md b/README.md index d04b1b8..a8989de 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Plugin is used to send actionable messages in [Outlook](http://outlook.com), [Of #### Global configuration values used as default in jobs -![GlobalConfigurationDefault](.README/globalconfigdefault.png?raw=true) +![GlobalConfiguratio![img.png](.README/globalconfig.png)nDefault](.README/globalconfigdefault.png?raw=true) ### Microsoft Teams From 9ffa565a3545cbaf59fafaf110d93071f88d4fa0 Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 13 Jul 2022 21:51:18 +0200 Subject: [PATCH 06/21] Fixing null check --- src/main/java/jenkins/plugins/office365connector/Proxy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/jenkins/plugins/office365connector/Proxy.java b/src/main/java/jenkins/plugins/office365connector/Proxy.java index 5f99ac0..e76b10e 100644 --- a/src/main/java/jenkins/plugins/office365connector/Proxy.java +++ b/src/main/java/jenkins/plugins/office365connector/Proxy.java @@ -49,7 +49,7 @@ public void setPassword(String password) { public Boolean proxyConfigured() { try { - return (!this.ip.equals(null) || !this.ip.equals("")); + return (this.ip != null); } catch (NullPointerException ex) { return false; From b10ce616a0847a304e26b6efd195e36ee4a47f11 Mon Sep 17 00:00:00 2001 From: Lee Date: Thu, 14 Jul 2022 22:34:26 +0200 Subject: [PATCH 07/21] Fixing null check --- .../plugins/office365connector/Proxy.java | 2 +- .../plugins/office365connector/Webhook.java | 42 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/jenkins/plugins/office365connector/Proxy.java b/src/main/java/jenkins/plugins/office365connector/Proxy.java index e76b10e..1d7bbb9 100644 --- a/src/main/java/jenkins/plugins/office365connector/Proxy.java +++ b/src/main/java/jenkins/plugins/office365connector/Proxy.java @@ -49,7 +49,7 @@ public void setPassword(String password) { public Boolean proxyConfigured() { try { - return (this.ip != null); + return (this.ip != null && this.ip != ""); } catch (NullPointerException ex) { return false; diff --git a/src/main/java/jenkins/plugins/office365connector/Webhook.java b/src/main/java/jenkins/plugins/office365connector/Webhook.java index b83fe17..3f85d24 100644 --- a/src/main/java/jenkins/plugins/office365connector/Webhook.java +++ b/src/main/java/jenkins/plugins/office365connector/Webhook.java @@ -64,7 +64,7 @@ public DescriptorImpl getDescriptor() { @DataBoundConstructor public Webhook(String url) { this.url = StringUtils.isEmpty(url) ? getDescriptor().getGlobalUrl() : url; - this.setProxyPluginConfiguration(getDescriptor().getProxyIp(), getDescriptor().getProxyPort(), getDescriptor().getProxyUsername(), getDescriptor().getProxyPassword()); + this.setProxyPluginConfiguration(getDescriptor().getIp(), getDescriptor().getPort(), getDescriptor().getUsername(), getDescriptor().getPassword()); } public String getUrl() { @@ -194,11 +194,11 @@ public static class DescriptorImpl extends Descriptor { private String globalUrl; private String globalName; - private String proxyIp; - private String proxyUsername; - private String proxyPassword; + private String ip; + private String username; + private String password; - private int proxyPort; + private Integer port; public DescriptorImpl() { load(); @@ -210,40 +210,40 @@ public String getDisplayName() { return "Webhook"; } - public String getProxyIp() { - return proxyIp; + public String getIp() { + return ip; } @DataBoundSetter - public void setProxyIp(String proxyIp) { - this.proxyIp = proxyIp; + public void setIp(String ip) { + this.ip = ip; } - public String getProxyUsername() { - return proxyUsername; + public String getUsername() { + return username; } @DataBoundSetter - public void setProxyUsername(String proxyUsername) { - this.proxyUsername = proxyUsername; + public void setUsername(String username) { + this.username = username; } - public String getProxyPassword() { - return proxyPassword; + public String getPassword() { + return password; } @DataBoundSetter - public void setProxyPassword(String proxyPassword) { - this.proxyPassword = proxyPassword; + public void setPassword(String password) { + this.password = password; } - public int getProxyPort() { - return proxyPort; + public Integer getPort() { + return port; } @DataBoundSetter - public void setProxyPort(int proxyPort) { - this.proxyPort = proxyPort; + public void setPort(Integer port) { + this.port = port; } public int getDefaultTimeout() { From b06ef6f5b83f766d84864d3de17d485412b674ba Mon Sep 17 00:00:00 2001 From: Lee Date: Mon, 25 Jul 2022 20:45:58 +0200 Subject: [PATCH 08/21] Added missing exception --- .../java/jenkins/plugins/office365connector/HttpWorker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java index e75da5f..a9a90e1 100644 --- a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java +++ b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java @@ -14,6 +14,7 @@ package jenkins.plugins.office365connector; import java.io.PrintStream; +import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.util.List; import java.util.concurrent.ExecutorService; @@ -76,7 +77,7 @@ public void run() { // uncomment to log what message has been sent // log("Posted JSON: %s", data); requestEntity = new StringRequestEntity(data, "application/json", StandardCharsets.UTF_8.name()); - } catch (Exception e) { + } catch (UnsupportedEncodingException e) { e.printStackTrace(logger); break; } From ed328017cc0e3a4941c6fba810c98683d7f2e999 Mon Sep 17 00:00:00 2001 From: Lee Date: Mon, 25 Jul 2022 20:46:48 +0200 Subject: [PATCH 09/21] Modified proxyConfigured to avoid a NPE scenario --- .../java/jenkins/plugins/office365connector/Proxy.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/jenkins/plugins/office365connector/Proxy.java b/src/main/java/jenkins/plugins/office365connector/Proxy.java index 1d7bbb9..977d4a9 100644 --- a/src/main/java/jenkins/plugins/office365connector/Proxy.java +++ b/src/main/java/jenkins/plugins/office365connector/Proxy.java @@ -1,5 +1,7 @@ package jenkins.plugins.office365connector; +import org.apache.commons.lang.StringUtils; + public class Proxy { private String ip; @@ -48,11 +50,6 @@ public void setPassword(String password) { } public Boolean proxyConfigured() { - try { - return (this.ip != null && this.ip != ""); - - } catch (NullPointerException ex) { - return false; - } + return (StringUtils.isEmpty(this.ip) && StringUtils.isEmpty(String.valueOf(this.port))); } } From 7af49d543a5e2184fd1734c79110e3bc39d6c6c5 Mon Sep 17 00:00:00 2001 From: Lee Date: Mon, 25 Jul 2022 20:47:13 +0200 Subject: [PATCH 10/21] Using temp reference to descriptor --- src/main/java/jenkins/plugins/office365connector/Webhook.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/jenkins/plugins/office365connector/Webhook.java b/src/main/java/jenkins/plugins/office365connector/Webhook.java index 3f85d24..090458f 100644 --- a/src/main/java/jenkins/plugins/office365connector/Webhook.java +++ b/src/main/java/jenkins/plugins/office365connector/Webhook.java @@ -64,7 +64,9 @@ public DescriptorImpl getDescriptor() { @DataBoundConstructor public Webhook(String url) { this.url = StringUtils.isEmpty(url) ? getDescriptor().getGlobalUrl() : url; - this.setProxyPluginConfiguration(getDescriptor().getIp(), getDescriptor().getPort(), getDescriptor().getUsername(), getDescriptor().getPassword()); + + DescriptorImpl globalConfig = getDescriptor(); + this.setProxyPluginConfiguration(globalConfig.getIp(), globalConfig.getPort(), globalConfig.getUsername(), globalConfig.getPassword()); } public String getUrl() { From ae547e4b5478f1c10e6a2012e3836cac2517e4c8 Mon Sep 17 00:00:00 2001 From: Leemalin Moodley Date: Wed, 3 Aug 2022 11:24:27 +0200 Subject: [PATCH 11/21] Fixed return condition --- src/main/java/jenkins/plugins/office365connector/Proxy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/jenkins/plugins/office365connector/Proxy.java b/src/main/java/jenkins/plugins/office365connector/Proxy.java index 977d4a9..6a3fb7d 100644 --- a/src/main/java/jenkins/plugins/office365connector/Proxy.java +++ b/src/main/java/jenkins/plugins/office365connector/Proxy.java @@ -50,6 +50,6 @@ public void setPassword(String password) { } public Boolean proxyConfigured() { - return (StringUtils.isEmpty(this.ip) && StringUtils.isEmpty(String.valueOf(this.port))); + return (!StringUtils.isEmpty(this.ip) && !StringUtils.isEmpty(String.valueOf(this.port))); } } From 09bac61fcb495bea96b9d6a6b74a846710db7730 Mon Sep 17 00:00:00 2001 From: Leemalin Moodley Date: Wed, 3 Aug 2022 11:43:41 +0200 Subject: [PATCH 12/21] reverted plugin version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a4f0874..5e51d63 100644 --- a/pom.xml +++ b/pom.xml @@ -143,7 +143,7 @@ org.jenkins-ci.tools maven-hpi-plugin - 3.17 + 3.5 InjectionIT From 9b4b793a78cbc842c4ed9dfb44e9aac3a6233fcc Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 31 Aug 2022 10:54:16 +0200 Subject: [PATCH 13/21] Set IOException instead of generic Exception --- .../java/jenkins/plugins/office365connector/HttpWorker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java index a9a90e1..7399d17 100644 --- a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java +++ b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java @@ -13,6 +13,7 @@ */ package jenkins.plugins.office365connector; +import java.io.IOException; import java.io.PrintStream; import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; @@ -94,7 +95,7 @@ public void run() { } else { success = true; } - } catch (Exception e) { + } catch (IOException e) { log("Failed to post data to webhook - %s", url); e.printStackTrace(logger); } finally { From a09c19ecc1bc843d6e95c2adabf6b2ab2ae981b8 Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 31 Aug 2022 11:02:44 +0200 Subject: [PATCH 14/21] proxyConfigured takes into account empty, blank and null strings --- src/main/java/jenkins/plugins/office365connector/Proxy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/jenkins/plugins/office365connector/Proxy.java b/src/main/java/jenkins/plugins/office365connector/Proxy.java index 6a3fb7d..d1fc435 100644 --- a/src/main/java/jenkins/plugins/office365connector/Proxy.java +++ b/src/main/java/jenkins/plugins/office365connector/Proxy.java @@ -50,6 +50,7 @@ public void setPassword(String password) { } public Boolean proxyConfigured() { - return (!StringUtils.isEmpty(this.ip) && !StringUtils.isEmpty(String.valueOf(this.port))); + return ((!StringUtils.isEmpty(this.ip) && !StringUtils.isEmpty(String.valueOf(this.port))) + && (!StringUtils.isBlank(this.ip) && !StringUtils.isBlank(String.valueOf(this.port)))); } } From be436e60d0d751332bbd0db2eb6a47c7e65122d6 Mon Sep 17 00:00:00 2001 From: Lee Date: Fri, 4 Nov 2022 11:03:18 +0200 Subject: [PATCH 15/21] Removed ProxyTest.java --- .../plugins/office365connector/Proxy.java | 56 ------------------- .../plugins/office365connector/ProxyTest.java | 49 ---------------- 2 files changed, 105 deletions(-) delete mode 100644 src/main/java/jenkins/plugins/office365connector/Proxy.java delete mode 100644 src/test/java/jenkins/plugins/office365connector/ProxyTest.java diff --git a/src/main/java/jenkins/plugins/office365connector/Proxy.java b/src/main/java/jenkins/plugins/office365connector/Proxy.java deleted file mode 100644 index d1fc435..0000000 --- a/src/main/java/jenkins/plugins/office365connector/Proxy.java +++ /dev/null @@ -1,56 +0,0 @@ -package jenkins.plugins.office365connector; - -import org.apache.commons.lang.StringUtils; - -public class Proxy { - - private String ip; - private Integer port; - private String username; - private String password; - - - public Proxy(String ip, Integer port, String username, String password) { - this.ip = ip; - this.port = port; - this.username = username; - this.password = password; - } - - public String getIp() { - return ip; - } - - public void setIp(String ip) { - this.ip = ip; - } - - public int getPort() { - return port; - } - - public void setPort(int port) { - this.port = port; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public Boolean proxyConfigured() { - return ((!StringUtils.isEmpty(this.ip) && !StringUtils.isEmpty(String.valueOf(this.port))) - && (!StringUtils.isBlank(this.ip) && !StringUtils.isBlank(String.valueOf(this.port)))); - } -} diff --git a/src/test/java/jenkins/plugins/office365connector/ProxyTest.java b/src/test/java/jenkins/plugins/office365connector/ProxyTest.java deleted file mode 100644 index 83a5945..0000000 --- a/src/test/java/jenkins/plugins/office365connector/ProxyTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package jenkins.plugins.office365connector; - -import junit.framework.TestCase; -import org.junit.Before; -import org.junit.Test; - -import static org.assertj.core.api.Assertions.assertThat; - -public class ProxyTest { - - private Proxy proxyTest; - private Proxy proxyTestNoCredentials; - - @Before - public void setUp() { - proxyTest = new Proxy("10.0.0.1", 65654, "myUsername", "myPassword"); - proxyTestNoCredentials = new Proxy("10.0.0.1", 65654, null, null); - } - - @Test - public void getIp() { - assertThat("10.0.0.1").isEqualTo(proxyTest.getIp()); - } - - @Test - public void getPort() { - assertThat(65654).isEqualTo(proxyTest.getPort()); - } - - @Test - public void getUsername() { - assertThat("myUsername").isEqualTo(proxyTest.getUsername()); - } - - @Test - public void getPassword() { - assertThat("myPassword").isEqualTo(proxyTest.getPassword()); - } - - @Test - public void proxyConfigured_True() { - assertThat(proxyTest.proxyConfigured().equals(true)); - } - - @Test - public void proxyConfigured_False() { - assertThat(proxyTest.proxyConfigured().equals(false)); - } -} \ No newline at end of file From fc028d1247f4fc431b58332c183313f4759bb6fc Mon Sep 17 00:00:00 2001 From: Lee Date: Fri, 4 Nov 2022 11:05:26 +0200 Subject: [PATCH 16/21] Using jenkins ProxyConfigration to handle plugin proxy info --- .../plugins/office365connector/HttpWorker.java | 15 +++++++-------- .../plugins/office365connector/Webhook.java | 13 ++++++++----- .../office365connector/HttpWorkerTest.java | 10 +++++----- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java index 7399d17..5347b52 100644 --- a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java +++ b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java @@ -43,7 +43,7 @@ public class HttpWorker implements Runnable { private final PrintStream logger; - private final Proxy pluginProxy; + private final ProxyConfiguration pluginProxy; private final String url; private final String data; @@ -51,7 +51,7 @@ public class HttpWorker implements Runnable { private static final int RETRIES = 3; - public HttpWorker(String url, String data, int timeout, PrintStream logger, Proxy pluginProxy) { + public HttpWorker(String url, String data, int timeout, PrintStream logger, ProxyConfiguration pluginProxy) { this.url = url; this.data = data; this.timeout = timeout; @@ -108,14 +108,13 @@ public void run() { private HttpClient getHttpClient() { HttpClient client = new HttpClient(); Jenkins jenkins = Jenkins.get(); - if (pluginProxy.proxyConfigured()) { - client.getHostConfiguration().setProxy(pluginProxy.getIp(), pluginProxy.getPort()); - if (StringUtils.isNotBlank(pluginProxy.getUsername())) { + if (pluginProxy != null) { + client.getHostConfiguration().setProxy(pluginProxy.getName(), pluginProxy.getPort()); + if (StringUtils.isNotBlank(pluginProxy.getUserName())) { client.getState().setProxyCredentials(AuthScope.ANY, - new UsernamePasswordCredentials(pluginProxy.getUsername(), pluginProxy.getPassword())); + new UsernamePasswordCredentials(pluginProxy.getUserName(), pluginProxy.getPassword())); } - } - if (jenkins != null) { + } else if (jenkins != null) { ProxyConfiguration proxy = jenkins.proxy; // Check job proxy first if (proxy != null) { diff --git a/src/main/java/jenkins/plugins/office365connector/Webhook.java b/src/main/java/jenkins/plugins/office365connector/Webhook.java index 090458f..2b652d2 100644 --- a/src/main/java/jenkins/plugins/office365connector/Webhook.java +++ b/src/main/java/jenkins/plugins/office365connector/Webhook.java @@ -18,6 +18,7 @@ import java.util.List; import javax.annotation.Nonnull; import hudson.Extension; +import hudson.ProxyConfiguration; import hudson.Util; import hudson.model.AbstractDescribableImpl; import hudson.model.Descriptor; @@ -50,7 +51,7 @@ public class Webhook extends AbstractDescribableImpl { private int timeout; - private Proxy pluginProxy; + private ProxyConfiguration pluginProxy; private List macros = Collections.emptyList(); @@ -66,7 +67,9 @@ public Webhook(String url) { this.url = StringUtils.isEmpty(url) ? getDescriptor().getGlobalUrl() : url; DescriptorImpl globalConfig = getDescriptor(); - this.setProxyPluginConfiguration(globalConfig.getIp(), globalConfig.getPort(), globalConfig.getUsername(), globalConfig.getPassword()); + if (globalConfig.getIp().length() > 0) { + this.setProxyPluginConfiguration(globalConfig.getIp(), globalConfig.getPort(), globalConfig.getUsername(), globalConfig.getPassword()); + } } public String getUrl() { @@ -77,12 +80,12 @@ public String getName() { return Util.fixEmptyAndTrim(StringUtils.isEmpty(name) ? getDescriptor().getGlobalName() : name); } - public Proxy getPluginProxy() { + public ProxyConfiguration getPluginProxy() { return this.pluginProxy; } - public void setProxyPluginConfiguration(String proxyIp, Integer proxyPort, String proxyUsername, String proxyPassword) { - this.pluginProxy = new Proxy(proxyIp, proxyPort, proxyUsername, proxyPassword); + public void setProxyPluginConfiguration(String proxyIp, int proxyPort, String proxyUsername, String proxyPassword) { + this.pluginProxy = new ProxyConfiguration(proxyIp, proxyPort, proxyUsername, proxyPassword); } @DataBoundSetter diff --git a/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java b/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java index 67b890a..3062757 100644 --- a/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java +++ b/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java @@ -37,7 +37,7 @@ public void HttpWorker_getHttpClient_NoJenkinsProxy() throws NoSuchMethodExcepti // given // from @Before - Proxy thisPluginProxy = new Proxy(null, null, null, null); + ProxyConfiguration thisPluginProxy = new ProxyConfiguration(null, 0, null, null); HttpWorker httpWorker = new HttpWorker("http://127.0.0.1", "{}", 30, System.out, thisPluginProxy); Method method = HttpWorker.class.getDeclaredMethod("getHttpClient"); method.setAccessible(true); @@ -55,7 +55,7 @@ public void HttpWorker_getHttpClient_JenkinsProxy() throws NoSuchMethodException // given // from @Before - Proxy thisPluginProxy = new Proxy(null, null, null, null); + ProxyConfiguration thisPluginProxy = new ProxyConfiguration(null, 0, null, null); Jenkins jenkins = Jenkins.get(); ProxyConfiguration proxyConfiguration = new ProxyConfiguration("name", 123, null, null, "*mockwebsite.com*"); jenkins.proxy = proxyConfiguration; @@ -77,7 +77,7 @@ public void HttpWorker_getHttpClient_JenkinsProxy_Ignored() throws NoSuchMethodE // given // from @Before - Proxy thisPluginProxy = new Proxy(null, null, null, null); + ProxyConfiguration thisPluginProxy = new ProxyConfiguration(null, 0, null, null); Jenkins jenkins = Jenkins.get(); ProxyConfiguration proxyConfiguration = new ProxyConfiguration("name", 123, null, null, "*mockwebsite.com*"); jenkins.proxy = proxyConfiguration; @@ -99,7 +99,7 @@ public void HttpWorker_getHttpClient_PluginProxy() throws NoSuchMethodException // given // from @Before - Proxy thisPluginProxy = new Proxy("10.0.0.1", 12345, null, null); + ProxyConfiguration thisPluginProxy = new ProxyConfiguration("10.0.0.1", 12345, null, null); HttpWorker httpWorker = new HttpWorker("http://127.0.0.1", "{}", 30, System.out, thisPluginProxy); Method method = HttpWorker.class.getDeclaredMethod("getHttpClient"); method.setAccessible(true); @@ -108,7 +108,7 @@ public void HttpWorker_getHttpClient_PluginProxy() throws NoSuchMethodException HttpClient httpClient = (HttpClient) ReflectionUtils.invokeMethod(method, httpWorker); // then - assertThat(httpClient.getHostConfiguration().getProxyHost()).isEqualTo(thisPluginProxy.getIp()); + assertThat(httpClient.getHostConfiguration().getProxyHost()).isEqualTo(thisPluginProxy.getName()); assertThat(httpClient.getHostConfiguration().getProxyPort()).isEqualTo(thisPluginProxy.getPort()); } } \ No newline at end of file From 7f5db722ee58fc4bf34135ddcaeea6b61973305f Mon Sep 17 00:00:00 2001 From: Lee Date: Mon, 7 Nov 2022 23:47:24 +0200 Subject: [PATCH 17/21] Refactored to reference ProxyConfiguration in Office365ConnectorWebhookNotifier --- .../office365connector/HttpWorker.java | 2 +- .../Office365ConnectorWebhookNotifier.java | 10 ++++- .../plugins/office365connector/Webhook.java | 41 ++++++------------- .../office365connector/HttpWorkerTest.java | 8 ++-- 4 files changed, 27 insertions(+), 34 deletions(-) diff --git a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java index 5347b52..ce6088b 100644 --- a/src/main/java/jenkins/plugins/office365connector/HttpWorker.java +++ b/src/main/java/jenkins/plugins/office365connector/HttpWorker.java @@ -108,7 +108,7 @@ public void run() { private HttpClient getHttpClient() { HttpClient client = new HttpClient(); Jenkins jenkins = Jenkins.get(); - if (pluginProxy != null) { + if (!StringUtils.isEmpty(pluginProxy.getName())) { client.getHostConfiguration().setProxy(pluginProxy.getName(), pluginProxy.getPort()); if (StringUtils.isNotBlank(pluginProxy.getUserName())) { client.getState().setProxyCredentials(AuthScope.ANY, diff --git a/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java b/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java index ce9738f..9b1fb03 100644 --- a/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java +++ b/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java @@ -23,6 +23,7 @@ import com.google.gson.FieldNamingPolicy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import hudson.ProxyConfiguration; import hudson.model.AbstractBuild; import hudson.model.Job; import hudson.model.Run; @@ -112,7 +113,14 @@ private void executeWorker(Webhook webhook, Card card) { try { String url = run.getEnvironment(taskListener).expand(webhook.getUrl()); String data = gson.toJson(card); - HttpWorker worker = new HttpWorker(url, data, webhook.getTimeout(), taskListener.getLogger(), webhook.getPluginProxy()); + + Integer port = 0; + if (!StringUtils.isEmpty(webhook.getDescriptor().getPort())) { + port = Integer.parseInt(webhook.getDescriptor().getPort()); + } + + ProxyConfiguration pluginProxy = new ProxyConfiguration(webhook.getDescriptor().getIp(), port, webhook.getDescriptor().getUsername(), webhook.getDescriptor().getPassword()); + HttpWorker worker = new HttpWorker(url, data, webhook.getTimeout(), taskListener.getLogger(), pluginProxy); worker.submit(); } catch (IOException | InterruptedException | RejectedExecutionException e) { log(String.format("Failed to notify webhook: %s", webhook.getName())); diff --git a/src/main/java/jenkins/plugins/office365connector/Webhook.java b/src/main/java/jenkins/plugins/office365connector/Webhook.java index 2b652d2..5fa06c4 100644 --- a/src/main/java/jenkins/plugins/office365connector/Webhook.java +++ b/src/main/java/jenkins/plugins/office365connector/Webhook.java @@ -51,8 +51,6 @@ public class Webhook extends AbstractDescribableImpl { private int timeout; - private ProxyConfiguration pluginProxy; - private List macros = Collections.emptyList(); private List factDefinitions = Collections.emptyList(); @@ -65,11 +63,6 @@ public DescriptorImpl getDescriptor() { @DataBoundConstructor public Webhook(String url) { this.url = StringUtils.isEmpty(url) ? getDescriptor().getGlobalUrl() : url; - - DescriptorImpl globalConfig = getDescriptor(); - if (globalConfig.getIp().length() > 0) { - this.setProxyPluginConfiguration(globalConfig.getIp(), globalConfig.getPort(), globalConfig.getUsername(), globalConfig.getPassword()); - } } public String getUrl() { @@ -80,14 +73,6 @@ public String getName() { return Util.fixEmptyAndTrim(StringUtils.isEmpty(name) ? getDescriptor().getGlobalName() : name); } - public ProxyConfiguration getPluginProxy() { - return this.pluginProxy; - } - - public void setProxyPluginConfiguration(String proxyIp, int proxyPort, String proxyUsername, String proxyPassword) { - this.pluginProxy = new ProxyConfiguration(proxyIp, proxyPort, proxyUsername, proxyPassword); - } - @DataBoundSetter public void setName(String name) { this.name = Util.fixEmptyAndTrim(name); @@ -200,11 +185,10 @@ public static class DescriptorImpl extends Descriptor { private String globalName; private String ip; + private String port; private String username; private String password; - private Integer port; - public DescriptorImpl() { load(); } @@ -216,39 +200,40 @@ public String getDisplayName() { } public String getIp() { - return ip; + return Util.fixNull(ip); } @DataBoundSetter public void setIp(String ip) { - this.ip = ip; + this.ip = Util.fixNull(ip); } public String getUsername() { - return username; + return Util.fixNull(username); } @DataBoundSetter public void setUsername(String username) { - this.username = username; + this.username = Util.fixNull(username); } public String getPassword() { - return password; + return Util.fixNull(password); } @DataBoundSetter public void setPassword(String password) { - this.password = password; + this.password = Util.fixNull(password); } - public Integer getPort() { - return port; + @Nonnull + public String getPort() { + return Util.fixNull(port); } @DataBoundSetter - public void setPort(Integer port) { - this.port = port; + public void setPort(String port) { + this.port = Util.fixNull(port); } public int getDefaultTimeout() { @@ -259,7 +244,7 @@ public FormValidation doCheckUrl(@QueryParameter String value) { return FormUtils.formValidateUrl(value); } - public FormValidation doCheckGlobalUrl(@QueryParameter String value) { + public FormValidation doCheckGlobalUrl(@QueryParameter String value) { if(StringUtils.isNotBlank(value)) { return FormUtils.formValidateUrl(value); } else { diff --git a/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java b/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java index 3062757..f2e0ee2 100644 --- a/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java +++ b/src/test/java/jenkins/plugins/office365connector/HttpWorkerTest.java @@ -37,7 +37,7 @@ public void HttpWorker_getHttpClient_NoJenkinsProxy() throws NoSuchMethodExcepti // given // from @Before - ProxyConfiguration thisPluginProxy = new ProxyConfiguration(null, 0, null, null); + ProxyConfiguration thisPluginProxy = new ProxyConfiguration("", 0, "", ""); HttpWorker httpWorker = new HttpWorker("http://127.0.0.1", "{}", 30, System.out, thisPluginProxy); Method method = HttpWorker.class.getDeclaredMethod("getHttpClient"); method.setAccessible(true); @@ -55,7 +55,7 @@ public void HttpWorker_getHttpClient_JenkinsProxy() throws NoSuchMethodException // given // from @Before - ProxyConfiguration thisPluginProxy = new ProxyConfiguration(null, 0, null, null); + ProxyConfiguration thisPluginProxy = new ProxyConfiguration("", 0, "", ""); Jenkins jenkins = Jenkins.get(); ProxyConfiguration proxyConfiguration = new ProxyConfiguration("name", 123, null, null, "*mockwebsite.com*"); jenkins.proxy = proxyConfiguration; @@ -77,7 +77,7 @@ public void HttpWorker_getHttpClient_JenkinsProxy_Ignored() throws NoSuchMethodE // given // from @Before - ProxyConfiguration thisPluginProxy = new ProxyConfiguration(null, 0, null, null); + ProxyConfiguration thisPluginProxy = new ProxyConfiguration("", 0, "", ""); Jenkins jenkins = Jenkins.get(); ProxyConfiguration proxyConfiguration = new ProxyConfiguration("name", 123, null, null, "*mockwebsite.com*"); jenkins.proxy = proxyConfiguration; @@ -99,7 +99,7 @@ public void HttpWorker_getHttpClient_PluginProxy() throws NoSuchMethodException // given // from @Before - ProxyConfiguration thisPluginProxy = new ProxyConfiguration("10.0.0.1", 12345, null, null); + ProxyConfiguration thisPluginProxy = new ProxyConfiguration("10.0.0.1", 12345, "", ""); HttpWorker httpWorker = new HttpWorker("http://127.0.0.1", "{}", 30, System.out, thisPluginProxy); Method method = HttpWorker.class.getDeclaredMethod("getHttpClient"); method.setAccessible(true); From 2b87fb50e319a76d5bb956d7d5a90de91aa826f2 Mon Sep 17 00:00:00 2001 From: Leemalin Moodley Date: Tue, 6 Dec 2022 11:53:31 +0200 Subject: [PATCH 18/21] renamed ip to host --- .../Office365ConnectorWebhookNotifier.java | 2 +- .../plugins/office365connector/Webhook.java | 31 +++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java b/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java index 9b1fb03..1c402b4 100644 --- a/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java +++ b/src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java @@ -119,7 +119,7 @@ private void executeWorker(Webhook webhook, Card card) { port = Integer.parseInt(webhook.getDescriptor().getPort()); } - ProxyConfiguration pluginProxy = new ProxyConfiguration(webhook.getDescriptor().getIp(), port, webhook.getDescriptor().getUsername(), webhook.getDescriptor().getPassword()); + ProxyConfiguration pluginProxy = new ProxyConfiguration(webhook.getDescriptor().getHost(), port, webhook.getDescriptor().getUsername(), webhook.getDescriptor().getPassword()); HttpWorker worker = new HttpWorker(url, data, webhook.getTimeout(), taskListener.getLogger(), pluginProxy); worker.submit(); } catch (IOException | InterruptedException | RejectedExecutionException e) { diff --git a/src/main/java/jenkins/plugins/office365connector/Webhook.java b/src/main/java/jenkins/plugins/office365connector/Webhook.java index 5fa06c4..6af7102 100644 --- a/src/main/java/jenkins/plugins/office365connector/Webhook.java +++ b/src/main/java/jenkins/plugins/office365connector/Webhook.java @@ -18,7 +18,6 @@ import java.util.List; import javax.annotation.Nonnull; import hudson.Extension; -import hudson.ProxyConfiguration; import hudson.Util; import hudson.model.AbstractDescribableImpl; import hudson.model.Descriptor; @@ -184,7 +183,7 @@ public static class DescriptorImpl extends Descriptor { private String globalUrl; private String globalName; - private String ip; + private String host; private String port; private String username; private String password; @@ -199,13 +198,23 @@ public String getDisplayName() { return "Webhook"; } - public String getIp() { - return Util.fixNull(ip); + public String getHost() { + return Util.fixNull(host); } @DataBoundSetter - public void setIp(String ip) { - this.ip = Util.fixNull(ip); + public void setHost(String host) { + this.host = Util.fixNull(host); + } + + @Nonnull + public String getPort() { + return Util.fixNull(port); + } + + @DataBoundSetter + public void setPort(String port) { + this.port = Util.fixNull(port); } public String getUsername() { @@ -226,16 +235,6 @@ public void setPassword(String password) { this.password = Util.fixNull(password); } - @Nonnull - public String getPort() { - return Util.fixNull(port); - } - - @DataBoundSetter - public void setPort(String port) { - this.port = Util.fixNull(port); - } - public int getDefaultTimeout() { return Webhook.DEFAULT_TIMEOUT; } From b728aba4d467b21a1e4d7a091bd791f8cf122645 Mon Sep 17 00:00:00 2001 From: Leemalin Moodley Date: Tue, 6 Dec 2022 11:54:24 +0200 Subject: [PATCH 19/21] fixed whitespace in xml entry --- .../jenkins/plugins/office365connector/Webhook/config.jelly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/config.jelly b/src/main/resources/jenkins/plugins/office365connector/Webhook/config.jelly index 71e421b..6917e9a 100644 --- a/src/main/resources/jenkins/plugins/office365connector/Webhook/config.jelly +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/config.jelly @@ -14,7 +14,7 @@ This section defines for which build statuses the notification is sent. - + From 4dd524545fc161846c4afe36e68bb8cf74d7def2 Mon Sep 17 00:00:00 2001 From: Leemalin Moodley Date: Tue, 6 Dec 2022 11:57:26 +0200 Subject: [PATCH 20/21] Use of term configuration --- .../jenkins/plugins/office365connector/Webhook/global.jelly | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly b/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly index f4ebda3..79142b9 100755 --- a/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/global.jelly @@ -8,12 +8,12 @@ - + This section defines the Office365Connector proxy settings that will apply to all webhook notifications. This proxy configuration will be prioritized over the Jenkins global proxy config - + From 29db0ddfab98c4ab640aa7d5b8ac41cd29d1febd Mon Sep 17 00:00:00 2001 From: Leemalin Moodley Date: Tue, 6 Dec 2022 11:57:46 +0200 Subject: [PATCH 21/21] Updating jelly help documentation --- .../jenkins/plugins/office365connector/Webhook/help-host.html | 1 + .../jenkins/plugins/office365connector/Webhook/help-ip.html | 1 - .../jenkins/plugins/office365connector/Webhook/help-port.html | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/jenkins/plugins/office365connector/Webhook/help-host.html delete mode 100644 src/main/resources/jenkins/plugins/office365connector/Webhook/help-ip.html diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/help-host.html b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-host.html new file mode 100644 index 0000000..87a8c3b --- /dev/null +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-host.html @@ -0,0 +1 @@ +
The hostname or ip address of the proxy server
diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/help-ip.html b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-ip.html deleted file mode 100644 index a62c127..0000000 --- a/src/main/resources/jenkins/plugins/office365connector/Webhook/help-ip.html +++ /dev/null @@ -1 +0,0 @@ -
The IP address of the proxy server
diff --git a/src/main/resources/jenkins/plugins/office365connector/Webhook/help-port.html b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-port.html index 75e11bd..fb85fe5 100644 --- a/src/main/resources/jenkins/plugins/office365connector/Webhook/help-port.html +++ b/src/main/resources/jenkins/plugins/office365connector/Webhook/help-port.html @@ -1 +1 @@ -
This field works in conjunction with the ip field to specify the HTTP proxy port.
+
This field works in conjunction with the host field to specify the HTTP proxy port.