diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 1b35752..f6e8f14 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -53,11 +53,11 @@ jobs: uses: actions/checkout@v2.4.0 with: fetch-depth: 0 - - name: Set up JDK 8 + - name: Set up JDK 17 uses: actions/setup-java@v2.5.0 with: distribution: temurin - java-version: 8 + java-version: 17 - name: Check Secrets env: DEBUG_USERNAME: ${{ secrets.MAVEN_USERNAME }} diff --git a/Jenkinsfile b/Jenkinsfile index 48bf230..ae2fc83 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1 +1,6 @@ -buildPlugin() \ No newline at end of file +buildPlugin( + useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests + configurations: [ + [platform: 'linux', jdk: 17], + ] +) \ No newline at end of file diff --git a/README.md b/README.md index 57ee58f..16f41eb 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,16 @@ To learn more about using this plugin, you can refer to the following documents: ## Development +Use `mvn` version from `3.8.1`. + Use the command `mvn clean hpi:run -Djetty.port=8090` to debug the plugin. See the instructions at https://wiki.jenkins.io/display/JENKINS/Plugin+tutorial. +### Requisition + +Jenkins: 2.448 + ## Companion products ### Katalon TestOps diff --git a/pom.xml b/pom.xml index 458e615..32b25f7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,31 +5,28 @@ org.jenkins-ci.plugins plugin - 3.56 + 4.79 org.jenkins-ci.plugins katalon - 1.0.34 + 1.0.37 hpi Katalon Plugin - Execute Katalon Studio in Jenkins - https://github.com/jenkinsci/katalon-plugin + https://github.com/katalon-studio/katalon-studio-jenkins-plugin - 1.625.3 - 8 + 2.448 + 17 1.20 - 2.13.13 - 3.12.0 - 1.0.17 + 1.0.18 4.5.13 @@ -49,9 +46,9 @@ - devalex88 - Alex - dev.alex.88@gmail.com + thvu-katalon + Vu + vu.than@katalon.com @@ -60,7 +57,7 @@ scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git https://github.com/jenkinsci/${project.artifactId}-plugin HEAD - + 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..dd1d454 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 { diff --git a/src/main/resources/index.jelly b/src/main/resources/index.jelly new file mode 100644 index 0000000..679377c --- /dev/null +++ b/src/main/resources/index.jelly @@ -0,0 +1,4 @@ + +
+ Execute Katalon Studio in Jenkins +
\ No newline at end of file