Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest jenkins #34

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
buildPlugin()
/*
See the documentation for more options:
https://github.com/jenkins-infra/pipeline-library/
*/
buildPlugin(
forkCount: '1C', // Run a JVM per core in tests
useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests
configurations: [
[platform: 'linux', jdk: 17],
[platform: 'windows', jdk: 17],
])
12 changes: 5 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.56</version>
<version>4.81</version>
<relativePath />
</parent>

Expand All @@ -19,17 +19,16 @@

<properties>
<!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
<jenkins.version>1.625.3</jenkins.version>
<java.level>8</java.level>
<jenkins.version>2.440.2</jenkins.version>
<java.level>17</java.level>
<!-- Other properties you may want to use:
~ java.level: set to 6 if your jenkins.version <= 1.611 ~ jenkins-test-harness.version: Jenkins Test Harness version you use to test the plugin. For Jenkins version >= 1.580.1 use JTH 2.0 or higher.
~ hpi-plugin.version: The HPI Maven Plugin version used by the plugin..
~ stapler-plugin.version: The Stapler Maven plugin version required by the plugin.
-->
<junit.plugin.version>1.20</junit.plugin.version>
<jackson.version>2.13.13</jackson.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<utils.version>1.0.17</utils.version>
<utils.version>1.0.18</utils.version>
<httpclient.version>4.5.13</httpclient.version>
</properties>

Expand Down Expand Up @@ -115,8 +114,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.level}</source>
<target>${java.level}</target>
<maven.compiler.release>${java.level}</maven.compiler.release>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import hudson.FilePath;
import hudson.Launcher;
import hudson.model.TaskListener;
import hudson.remoting.VirtualChannel;
import jenkins.security.MasterToSlaveCallable;

import java.util.HashMap;
Expand All @@ -26,7 +27,11 @@ public static boolean executeKatalon(
String xvfbConfiguration) {
Logger logger = new JenkinsLogger(taskListener);
try {
return launcher.getChannel().call(new MasterToSlaveCallable<Boolean, Exception>() {
VirtualChannel channel = launcher.getChannel();
if (channel == null) {
throw new Exception("Channel not found!");
}
return channel.call(new MasterToSlaveCallable<Boolean, Exception>() {
@Override
public Boolean call() throws Exception {

Expand Down Expand Up @@ -60,4 +65,4 @@ public Boolean call() throws Exception {
return false;
}
}
}
}
4 changes: 4 additions & 0 deletions src/main/resources/index.jelly
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?jelly escape-by-default='true'?>
<div>
Katalon plugin for Jenkins
</div>
Loading