2

I have built a jenkins pipeline for executing a test on a windows server. Once the automated test report is generated on the windows server, it ships that report to a different server.

There are methods for that automation framework (that code I can't publish and not done by me). I have done only the Jenkins pipeline part.

When I do a change to that framework (adding a comment or any other change) and commit it to git my pipeline works perfectly fine and report get copied to the destination server.

But when I execute the jenkins build in the second time without any commits it gives the following error:

4: Failure
    at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
    at com.jcraft.jsch.ChannelSftp.mkdir(ChannelSftp.java:2182)
    at com.framework.Jcraft.createDirectory(Jcraft.java:116)
    at com.framework.Jcraft.transferReportToServer(Jcraft.java:48)
    at com.framework.Base.transferReportToServer(Base.java:193)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
    at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
    at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
    at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:344)
    at org.testng.SuiteRunner.run(SuiteRunner.java:276)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
    at org.testng.TestNG.runSuites(TestNG.java:1063)
    at org.testng.TestNG.run(TestNG.java:1031)
    at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283)
    at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
    at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)

Regardless the error what I am getting my question is why it works when there are new commits in the code and why it doesn't work when there are no commits (even if I add a comment it works perfectly fine)

  • There is no space issue on the server ( already checked )
  • Monitored SFTP logs while the build execution ( I can see the session is creating successfully and closing within about 5 seconds)
  • No permission issues ( if there are permission issues this cannot be successful when there is a commit)

can anyone help me to figure out this issue?

Bruce Becker
  • 3,783
  • 4
  • 20
  • 41

0 Answers0