diff --git a/Jenkinsfile b/Jenkinsfile index fa39036..18218b7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,4 +2,4 @@ See the documentation for more options: https://github.com/jenkins-infra/pipeline-library/ */ -buildPlugin(useAci: true) +buildPlugin(useContainerAgent: true) diff --git a/pom.xml b/pom.xml index 7943bba..8238616 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ ${revision}${changelist} hpi - 4.0.7 + 4.0.8 -SNAPSHOT jenkinsci/leapwork-plugin -SNAPSHOT diff --git a/src/main/java/com/Leapwork/Leapwork_plugin/LeapworkJenkinsBridgeBuilder.java b/src/main/java/com/Leapwork/Leapwork_plugin/LeapworkJenkinsBridgeBuilder.java index a20177c..e803d0e 100644 --- a/src/main/java/com/Leapwork/Leapwork_plugin/LeapworkJenkinsBridgeBuilder.java +++ b/src/main/java/com/Leapwork/Leapwork_plugin/LeapworkJenkinsBridgeBuilder.java @@ -19,6 +19,7 @@ import com.Leapwork.Leapwork_plugin.model.RunCollection; import com.Leapwork.Leapwork_plugin.model.RunItem; import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; import hudson.AbortException; import hudson.EnvVars; @@ -50,6 +51,7 @@ public class LeapworkJenkinsBridgeBuilder extends Builder implements SimpleBuild private boolean leapworkWritePassedFlowKeyFrames; private boolean leapworkEnableHttps; private String leapworkScheduleVariables; + private static final int TIMEOUT_IN_SECONDS = 180; private static PluginHandler pluginHandler = PluginHandler.getInstance(); @@ -170,8 +172,13 @@ public void perform(final Run build, FilePath workspace, Launcher launcher String scheduleVariablesRequestPart = pluginHandler .getScheduleVariablesRequestPart(getLeapworkScheduleVariables(), listener); + + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder() + .setReadTimeout(TIMEOUT_IN_SECONDS * 1000) + .setRequestTimeout(TIMEOUT_IN_SECONDS * 1000) + .build(); - try (AsyncHttpClient mainClient = new AsyncHttpClient()) { + try (AsyncHttpClient mainClient = new AsyncHttpClient(config)) { // Get schedule titles (or/and ids in case of pipeline) LinkedHashMap schedulesIdTitleHashMap = pluginHandler.getSchedulesIdTitleHashMap(mainClient,