diff --git a/Jenkinsfile b/Jenkinsfile index 48bf230..21e0777 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1 +1,11 @@ -buildPlugin() \ No newline at end of file +/* + 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], +]) \ No newline at end of file diff --git a/pom.xml b/pom.xml index 458e615..5b8d9af 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.plugins plugin - 3.56 + 4.81 @@ -19,8 +19,8 @@ - 1.625.3 - 8 + 2.440.2 + 17 1.20 2.13.13 - 3.12.0 - 1.0.17 + 1.0.18 4.5.13 @@ -115,8 +114,7 @@ org.apache.maven.plugins maven-compiler-plugin - ${java.level} - ${java.level} + ${java.level} diff --git a/src/main/java/com/katalon/jenkins/plugin/helper/ExecuteKatalonStudioHelper.java b/src/main/java/com/katalon/jenkins/plugin/helper/ExecuteKatalonStudioHelper.java index af5ea76..b7e7488 100644 --- a/src/main/java/com/katalon/jenkins/plugin/helper/ExecuteKatalonStudioHelper.java +++ b/src/main/java/com/katalon/jenkins/plugin/helper/ExecuteKatalonStudioHelper.java @@ -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; @@ -26,7 +27,11 @@ public static boolean executeKatalon( String xvfbConfiguration) { Logger logger = new JenkinsLogger(taskListener); try { - return launcher.getChannel().call(new MasterToSlaveCallable() { + VirtualChannel channel = launcher.getChannel(); + if (channel == null) { + throw new Exception("Channel not found!"); + } + return channel.call(new MasterToSlaveCallable() { @Override public Boolean call() throws Exception { @@ -60,4 +65,4 @@ public Boolean call() throws Exception { return false; } } -} +} \ No newline at end of file diff --git a/src/main/resources/index.jelly b/src/main/resources/index.jelly new file mode 100644 index 0000000..244a8e1 --- /dev/null +++ b/src/main/resources/index.jelly @@ -0,0 +1,4 @@ + +
+ Katalon plugin for Jenkins +
\ No newline at end of file