Skip to content

Commit b181da7

Browse files
authored
Migrate from EE 8 to EE 9 (#228)
1 parent 909e178 commit b181da7

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

Jenkinsfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
buildPlugin(useContainerAgent: true, configurations: [
2-
[ platform: "linux", jdk: "17" ]
3-
])
2+
[platform: 'linux', jdk: 21],
3+
[platform: 'windows', jdk: 17],
4+
])

pom.xml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
<parent>
66
<groupId>org.jenkins-ci.plugins</groupId>
77
<artifactId>plugin</artifactId>
8-
<version>5.3</version>
8+
<version>5.7</version>
99
<relativePath />
1010
</parent>
1111

1212
<properties>
1313
<changelist>999999-SNAPSHOT</changelist>
14-
<!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
15-
<jenkins.version>2.479.1</jenkins.version>
16-
<bom.artifactId>2.479.x</bom.artifactId>
17-
<bom.version>3761.vd922730f0fd2</bom.version>
14+
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
15+
<jenkins.baseline>2.479</jenkins.baseline>
16+
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
17+
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
1818

1919
<!--
2020
Other properties you may want to use:
@@ -28,7 +28,7 @@
2828
<groupId>io.jenkins.plugins</groupId>
2929
<artifactId>rest-list-parameter</artifactId>
3030
<inceptionYear>2020</inceptionYear>
31-
<!--url>https://github.com/jenkinsci/${project.artifactId}-plugin/blob/${project.artifactId}-${revision}/README.adoc</url-->
31+
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
3232
<version>${changelist}</version>
3333
<packaging>hpi</packaging>
3434

@@ -58,18 +58,18 @@
5858
</issueManagement>
5959

6060
<scm>
61-
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
62-
<developerConnection>scm:git:[email protected]:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
63-
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
64-
<tag>HEAD</tag>
61+
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
62+
<developerConnection>scm:git:[email protected]:${gitHubRepo}.git</developerConnection>
63+
<url>https://github.com/${gitHubRepo}</url>
64+
<tag>${scmTag}</tag>
6565
</scm>
6666

6767
<dependencyManagement>
6868
<dependencies>
6969
<dependency>
7070
<groupId>io.jenkins.tools.bom</groupId>
71-
<artifactId>bom-${bom.artifactId}</artifactId>
72-
<version>${bom.version}</version>
71+
<artifactId>bom-${jenkins.baseline}.x</artifactId>
72+
<version>3944.v1a_e4f8b_452db_</version>
7373
<scope>import</scope>
7474
<type>pom</type>
7575
</dependency>
@@ -111,9 +111,8 @@
111111
<version>4.11.0-181.v1de5b_83857df</version>
112112
</dependency>
113113
<dependency>
114-
<groupId>com.jayway.jsonpath</groupId>
115-
<artifactId>json-path</artifactId>
116-
<version>2.9.0</version>
114+
<groupId>io.jenkins.plugins</groupId>
115+
<artifactId>json-path-api</artifactId>
117116
</dependency>
118117
<dependency>
119118
<groupId>io.jenkins.plugins</groupId>
@@ -164,4 +163,4 @@
164163
<url>https://repo.jenkins-ci.org/public/</url>
165164
</pluginRepository>
166165
</pluginRepositories>
167-
</project>
166+
</project>

src/main/java/io/jenkins/plugins/restlistparam/RestListParameterDefinition.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ public String getErrorMsg() {
192192
public List<ValueItem> getValues() {
193193
Item context = null;
194194

195-
if (Stapler.getCurrentRequest() != null) {
196-
context = Stapler.getCurrentRequest().findAncestorObject(Item.class);
195+
if (Stapler.getCurrentRequest2() != null) {
196+
context = Stapler.getCurrentRequest2().findAncestorObject(Item.class);
197197
}
198198

199199
Optional<StandardCredentials> credentials = CredentialsUtils.findCredentials(context, credentialId);
@@ -236,7 +236,7 @@ public ParameterValue createValue(final String value) {
236236
}
237237

238238
@Override
239-
public ParameterValue createValue(final StaplerRequest req,
239+
public ParameterValue createValue(final StaplerRequest2 req,
240240
final JSONObject jo)
241241
{
242242
RestListParameterValue value = req.bindJSON(RestListParameterValue.class, jo);

0 commit comments

Comments
 (0)