Skip to content

Commit 51355c5

Browse files
Require Jenkins 2.479.1 and Jakarta EE 9
1 parent 2be46e0 commit 51355c5

File tree

18 files changed

+38
-46
lines changed

18 files changed

+38
-46
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- uses: actions/setup-java@v3
2525
with:
26-
java-version: 11
26+
java-version: 17
2727
distribution: adopt
2828

2929
- run: mvn --batch-mode verify

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: actions/setup-java@v3
2121
with:
22-
java-version: 11
22+
java-version: 17
2323
distribution: adopt
2424

2525
- name: Generate code coverage

pom.xml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<parent>
55
<groupId>org.jenkins-ci.plugins</groupId>
66
<artifactId>plugin</artifactId>
7-
<version>4.88</version>
7+
<version>5.7</version>
88
<relativePath />
99
</parent>
1010

1111
<licenses>
1212
<license>
1313
<name>The Apache Software License, Version 2.0</name>
14-
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
14+
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
1515
<distribution>repo</distribution>
1616
</license>
1717
</licenses>
@@ -27,8 +27,8 @@
2727
<revision>5.0.1</revision>
2828
<changelist>-SNAPSHOT</changelist>
2929
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
30-
<jenkins.baseline>2.414</jenkins.baseline>
31-
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
30+
<jenkins.baseline>2.479</jenkins.baseline>
31+
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
3232

3333
<gitHubRepo>jenkinsci/office-365-connector-plugin</gitHubRepo>
3434

@@ -44,7 +44,7 @@
4444
https://repo.jenkins-ci.org/artifactory/public/io/jenkins/tools/bom/
4545
https://www.jenkins.io/doc/developer/plugin-development/dependency-management/#jenkins-plugin-bom
4646
-->
47-
<version>2982.vdce2153031a_0</version>
47+
<version>4051.v78dce3ce8b_d6</version>
4848
<scope>import</scope>
4949
<type>pom</type>
5050
</dependency>
@@ -99,12 +99,6 @@
9999
<artifactId>commons-validator</artifactId>
100100
<version>1.7</version>
101101
</dependency>
102-
<dependency>
103-
<groupId>com.google.code.findbugs</groupId>
104-
<artifactId>findbugs-annotations</artifactId>
105-
<version>3.0.1</version>
106-
<scope>provided</scope>
107-
</dependency>
108102
</dependencies>
109103

110104
<build>
@@ -143,14 +137,14 @@
143137
<name>Out conn</name>
144138
<email>outconn@microsoft.com</email>
145139
<organization>Microsoft Corp.</organization>
146-
<organizationUrl>http://microsoft.com</organizationUrl>
140+
<organizationUrl>https://microsoft.com</organizationUrl>
147141
</developer>
148142
<developer>
149143
<id>srhebbar</id>
150144
<name>Srivardhan Hebbar</name>
151145
<email>srhebbar@microsoft.com</email>
152146
<organization>Microsoft Corp.</organization>
153-
<organizationUrl>http://microsoft.com</organizationUrl>
147+
<organizationUrl>https://microsoft.com</organizationUrl>
154148
</developer>
155149
</developers>
156150

src/main/java/jenkins/plugins/office365connector/FactsBuilder.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,9 @@ public void addRemarks() {
8080
}
8181

8282
public void addCommitters() {
83-
if (!(run instanceof RunWithSCM)) {
83+
if (!(run instanceof RunWithSCM runWithSCM)) {
8484
return;
8585
}
86-
RunWithSCM runWithSCM = (RunWithSCM) run;
8786
Set<User> authors = runWithSCM.getCulprits();
8887

8988
String joinedCommitters = authors.stream()
@@ -93,10 +92,9 @@ public void addCommitters() {
9392
}
9493

9594
public void addDevelopers() {
96-
if (!(run instanceof RunWithSCM)) {
95+
if (!(run instanceof RunWithSCM runWithSCM)) {
9796
return;
9897
}
99-
RunWithSCM runWithSCM = (RunWithSCM) run;
10098

10199
List<ChangeLogSet<ChangeLogSet.Entry>> sets = runWithSCM.getChangeSets();
102100

src/main/java/jenkins/plugins/office365connector/HttpWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private CloseableHttpClient getHttpClient() {
111111
if (!isNoProxyHost(this.url, noHostProxyPatterns)) {
112112
builder.setProxy(new HttpHost(proxy.name, proxy.port));
113113
String username = proxy.getUserName();
114-
String password = proxy.getPassword();
114+
String password = proxy.getSecretPassword().getPlainText();
115115
// Consider it to be passed if username specified. Sufficient?
116116
if (StringUtils.isNotBlank(username)) {
117117
CredentialsProvider credsProvider = new BasicCredentialsProvider();

src/main/java/jenkins/plugins/office365connector/Office365ConnectorWebhookNotifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void sendBuildStepNotification(StepParameters stepParameters) {
112112
private void executeWorker(Webhook webhook, Card card) {
113113
try {
114114
String url = run.getEnvironment(taskListener).expand(webhook.getUrl());
115-
String data = gson.toJson(card == null ? null : card.toPaylod());
115+
String data = gson.toJson(card == null ? null : card.toPayload());
116116
HttpWorker worker = new HttpWorker(url, data, webhook.getTimeout(), taskListener.getLogger());
117117
worker.submit();
118118
} catch (IOException | InterruptedException | RejectedExecutionException e) {

src/main/java/jenkins/plugins/office365connector/Webhook.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.kohsuke.stapler.DataBoundConstructor;
3232
import org.kohsuke.stapler.DataBoundSetter;
3333
import org.kohsuke.stapler.QueryParameter;
34-
import org.kohsuke.stapler.StaplerRequest;
34+
import org.kohsuke.stapler.StaplerRequest2;
3535

3636
public class Webhook extends AbstractDescribableImpl<Webhook> {
3737

@@ -258,7 +258,7 @@ public void setGlobalName(String name) {
258258
}
259259

260260
@Override
261-
public boolean configure(StaplerRequest req, JSONObject formData) {
261+
public boolean configure(StaplerRequest2 req, JSONObject formData) {
262262
req.bindJSON(this, formData);
263263
save();
264264
return true;

src/main/java/jenkins/plugins/office365connector/WebhookJobPropertyDescriptor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import net.sf.json.JSONArray;
2424
import net.sf.json.JSONObject;
2525
import org.jenkinsci.Symbol;
26-
import org.kohsuke.stapler.StaplerRequest;
26+
import org.kohsuke.stapler.StaplerRequest2;
2727

2828
@Extension
2929
@Symbol("office365ConnectorWebhooks")
@@ -56,7 +56,7 @@ public String getDisplayName() {
5656
}
5757

5858
@Override
59-
public WebhookJobProperty newInstance(StaplerRequest req, JSONObject formData) {
59+
public WebhookJobProperty newInstance(StaplerRequest2 req, JSONObject formData) {
6060

6161
List<Webhook> webhooks = new ArrayList<>();
6262
if (formData != null && !formData.isNullObject()) {
@@ -75,7 +75,7 @@ public WebhookJobProperty newInstance(StaplerRequest req, JSONObject formData) {
7575
}
7676

7777
@Override
78-
public boolean configure(StaplerRequest req, JSONObject formData) {
78+
public boolean configure(StaplerRequest2 req, JSONObject formData) {
7979
save();
8080
return true;
8181
}

src/main/java/jenkins/plugins/office365connector/model/Card.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
public interface Card {
66

7-
public Object toPaylod();
7+
Object toPayload();
88

99
void setAction(List<CardAction> actions);
1010

src/main/java/jenkins/plugins/office365connector/model/Fact.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* Licensed under the Apache License, Version 2.0 (the "License");
33
* you may not use this file except in compliance with the License.
44
* You may obtain a copy of the License at
5-
*
5+
* <p>
66
* http://www.apache.org/licenses/LICENSE-2.0
7-
*
7+
* <p>
88
* Unless required by applicable law or agreed to in writing, software
99
* distributed under the License is distributed on an "AS IS" BASIS,
1010
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

0 commit comments

Comments
 (0)