Jenkins Pipeline on Kubernetes hangs when Maven build is executed by rtMaven.run and executes sh commands with exec-maven-plugin
Jenkins Pipeline on Kubernetes does not hang when Maven build is executed by rtMaven.run and executes the same sh commands with maven-antrun-plugin
Jenkins Pipeline on Kubernetes does not hang when Maven Build does not use rtMaven.run but mvn and executes sh commands with exec-maven-plugin
rtMaven seems to have a problem in recognising the sh commands termination when executed by exec-maven-plugin
Pipeline log:
10:10:54 [main] WARNING org.jenkinsci.plugins.pipeline.maven.eventspy.handler.CatchAllExecutionHandler - [jenkins-event-spy] Unexpected Maven project file name 'testPom.xml', problems may occur
10:10:55 [main] WARNING org.jenkinsci.plugins.pipeline.maven.eventspy.handler.ProjectSucceededExecutionHandler - [jenkins-event-spy] Unexpected Maven project file name 'testPom.xml', problems may occur
10:10:55 [main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: Saving Build Info to '/home/jenkins/agent/workspace/Simple_Artifact_Plugin_Test/SBDK-6802/target/build-info.json'
10:10:55 [main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: deploy artifacts set to false, artifacts will not be deployed...
10:10:55 [main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: publish build info set to false, build info will not be published...
10:10:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
10:10:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD SUCCESS
10:10:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
10:10:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 23.266 s
10:10:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2024-10-14T10:10:55+02:00
10:10:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
10:10:55 [main] WARNING org.jenkinsci.plugins.pipeline.maven.eventspy.handler.MavenExecutionResultHandler - [jenkins-event-spy] Unexpected Maven project file name 'testPom.xml', problems may occur
10:10:55 [main] INFO org.jenkinsci.plugins.pipeline.maven.eventspy.reporter.FileMavenEventReporter - [jenkins-event-spy] Generated /home/jenkins/agent/workspace/Simple_Artifact_Plugin_Test@tmp/withMaven3a1ae27f/maven-spy-20241014-101031-8796038905462900611039.log
#### This is where the pipeline hangs ####
Jenkins logger:
Oct 14, 2024 10:10:25 AM FINEST org.jfrog.hudson.util.JenkinsBuildInfoLog
Base URL: api/system/version
Oct 14, 2024 10:10:25 AM FINEST org.jfrog.hudson.util.JenkinsBuildInfoLog
Version result: {"version":"7.90.10","revision":"79010900","servicesVersions":{"package_handler_version":""},"addons":["ha","build","docker","helmoci","oci","packages-archive","vagrant","replication","filestore","curation","plugins","worker","gems","composer","npm","bower","nuget","debian","opkg","rpm","cocoapods","conan","vcs","release-bundle","jf-connect","jf-event","replicator","keys","alpine","analytics","cargo","chef","federated","git","observability","onboarding","pub","rest","swift","lead-artifact-detector","conda","terraform","tracker","license","puppet","ldap","sso","layouts","properties","search","securityresourceaddon","filtered-resources","p2","watch","webstart","support","xray","retention","policies"],"license":"6e996ef8b1590afcf8dba165bdd4894f4dffdfd93","entitlements":{"EVENT_BASED_PULL_REPLICATION":true,"SMART_REMOTE_TARGET_FOR_EDGE":false,"REPO_REPLICATION":true,"MULTIPUSH_REPLICATION":true}}
Oct 14, 2024 10:10:25 AM FINEST org.jfrog.hudson.util.JenkinsBuildInfoLog
Base URL: api/system/usage
Oct 14, 2024 10:10:25 AM FINEST org.jfrog.hudson.util.JenkinsBuildInfoLog
Usage info sent successfully.
Oct 14, 2024 10:10:29 AM FINEST org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecProc
Waiting for websocket to close on command finish (java.util.concurrent.CountDownLatch@793a7876[Count = 1])
Oct 14, 2024 10:11:29 AM FINE org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecProc
sent a newline to keep socket alive
Bug Description
Pipeline log:
Jenkins logger:
Additional context
Issue seems to be related to:
Expected behavior
Versions
To Reproduce
Jenkinsfile:
testPom.xml: