Jenkins - How to forcibly mark build successful - jenkins

I have this error:
java.io.IOException: Remote call on build4 failed
at hudson.remoting.Channel.call(Channel.java:789)
at hudson.Launcher$RemoteLauncher.kill(Launcher.java:953)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:540)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class hudson.util.jna.GNUCLibrary
at hudson.plugins.signal_killer.SignalKiller.sendSignal(SignalKiller.java:45)
at hudson.plugins.signal_killer.SignalKiller.kill(SignalKiller.java:29)
at hudson.util.ProcessTree$OSProcess.killByKiller(ProcessTree.java:216)
at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:427)
at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:487)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:965)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:956)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:62)
at java.lang.Thread.run(Unknown Source)
at ......remote call to build4(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:252)
at hudson.remoting.Channel.call(Channel.java:781)
... 6 more
after my build. This error marked build as FAILED.
But I need to forcibly mark it as SUCCESS, because I got successful result of build - *.exe link of my distrib.
I've tried to use Jenkins Text Finder plugin:
Settings of JTF
It was looking for my regex in console output and mark build successful but it didn't work as I expected - it found regex, but didn't mark build successful.
Is there another way to solve this problem?

This isn't possible — the build result can only be marked as worse than the existing result, and therefore the Text Finder plugin can only set your build as UNSTABLE or FAILED.
It would appear that you need to wait for a resolution to JENKINS-20481. You should add as much detail to that ticket as you can to help.

Related

Jenkins Agent JNLP4 Connection Issue

I am having an issue with a Jenkins agent not being able to connect with the Controller when a specific job ends. All other jobs are completed without any issues.
Basically, the job runs on the agent without any issues and gives out the expected result but, fails when it is time to hand over the job to the Jenkins master.
Both Controller and Agent are windows server VMs.
I saw multiple questions about this issue in multiple forums and Jenkins support but none of the suggested solutions is able to solve my issue.
The error message is:
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection to hostname/IP:16076
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:1001)
at hudson.FilePath.act(FilePath.java:1166)
at hudson.FilePath.act(FilePath.java:1155)
at hudson.FilePath.copyTo(FilePath.java:2493)
at hudson.FilePath.copyTo(FilePath.java:2448)
at hudson.plugins.logparser.LogParserStatusComputer.computeStatusMatches(LogParserStatusComputer.java:88)
at hudson.plugins.logparser.LogParserStatusComputer.access$000(LogParserStatusComputer.java:22)
at hudson.plugins.logparser.LogParserStatusComputer$1.call(LogParserStatusComputer.java:54)
at hudson.plugins.logparser.LogParserStatusComputer$1.call(LogParserStatusComputer.java:47)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:122)
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from hostname/IP:50925
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:1001)
at hudson.plugins.logparser.LogParserStatusComputer.computeStatusMatches(LogParserStatusComputer.java:47)
at hudson.plugins.logparser.LogParserStatusComputer.<init>(LogParserStatusComputer.java:36)
at hudson.plugins.logparser.LogParserParser.parseLogBody(LogParserParser.java:355)
at hudson.plugins.logparser.LogParserParser.parseLog(LogParserParser.java:165)
at hudson.plugins.logparser.LogParserPublisher.perform(LogParserPublisher.java:119)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755)
at hudson.model.Build$BuildExecution.post2(Build.java:178)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:699)
at hudson.model.Run.execute(Run.java:1913)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:99)
at hudson.model.Executor.run(Executor.java:431)
java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 3
e:\jenkbuilds\(.+)\builds/[0-9]+(/.*)?
^
at java.util.regex.Pattern.error(Unknown Source)
at java.util.regex.Pattern.escape(Unknown Source)
at java.util.regex.Pattern.atom(Unknown Source)
at java.util.regex.Pattern.sequence(Unknown Source)
at java.util.regex.Pattern.expr(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.util.regex.Pattern.<init>(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at jenkins.security.s2m.RunningBuildFilePathFilter.op(RunningBuildFilePathFilter.java:91)
at jenkins.ReflectiveFilePathFilter.read(ReflectiveFilePathFilter.java:21)
at jenkins.FilePathFilterAggregator.read(FilePathFilterAggregator.java:75)
at jenkins.SoloFilePathFilter.read(SoloFilePathFilter.java:66)
at hudson.FilePath.reading(FilePath.java:3497)
at hudson.FilePath.access$300(FilePath.java:213)
at hudson.FilePath$CopyTo.invoke(FilePath.java:2507)
at hudson.FilePath$CopyTo.invoke(FilePath.java:2499)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3338)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
at hudson.remoting.CallableDecoratorList.lambda$applyDecorator$0(CallableDecoratorList.java:19)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Build step 'Console output (build log) parsing' marked build as failure
Archiving artifacts
Recording test results
Finished: FAILURE```
Please let me know if you would like to have more information.
Any help will be greatly appriciated.
Illegal/unsupported escape sequence near index 3 e:\jenkbuilds\(.+)\builds/[0-9]+(/.*)?
Build step 'Console output (build log) parsing' marked build as failure
Archiving artifacts
It would seem it's interpreting your path regex as an escape character "\j*". Wherever that regex is, try double slash, "e:\\jenbuilds", or try chage to unix style "/".
It's either the ArchiveArtifacts step or right before that. Show your config steps?
I managed to resolve the issue using #Ian W comment. When diving into the 'Log Parser' plugin's settings, I found that my last update to Jenkins plugins reset its settings.
I wasn't aware that there is a modified rule in Jenkins for this plugin.
To be more specific:
To find the list of rules:
Manage Jenkins - > Configure System -> Multi-job Retry Rule -> Log Parser Rules
To update the job:
Job -> Configure -> Post-Build Actions -> Use Project Rule -> paste rule
I hope this will turn to be useful for someone as this was quite of a challenge to find and fix.

java.io.IOException: Can't find allure commandline <null>

My Jenkins master system is linux and slave system is windows.
I have set the allure commandline path in Global tool configuration and slave configuration, but when I run the job, I'm getting following error:
ERROR: Step ‘Allure Report’ aborted due to exception:
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ip/ip:port
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
at hudson.remoting.Channel.call(Channel.java:908)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.getMajorVersion(AllureCommandlineInstallation.java:58)
at ru.yandex.qatools.allure.jenkins.ReportBuilder.build(ReportBuilder.java:44)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:298)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:223)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1749)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:421)
java.io.IOException: Can't find allure commandline <null>
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$2.call(AllureCommandlineInstallation.java:63)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$2.call(AllureCommandlineInstallation.java:58)
at hudson.remoting.UserRequest.perform(UserRequest.java:207)
at hudson.remoting.UserRequest.perform(UserRequest.java:53)
at hudson.remoting.Request$2.run(Request.java:358)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:98)
at java.lang.Thread.run(Unknown Source)
Finished: FAILURE
my question is resolved by #vipinnambiar' answer,Thanks very much!
"On the agent configuration setting,set the Allure installation home directory(without the "bin") should resolve this issue. That worked for me."--#vipinnambiar
enter image description here

Jenkins configuration with jira.Auto defect reporting on jira if build failed

Hello i am new to jenkins sorry if i can't explain my problem pretty much clear.
I am assigned a task to auto report defect to jira from jenkins against failed cases.
I have installed following plugin
1)Jira Plugin
2)JiraTestResultReporter plugin
i have successfully implemented the configurations required on Configure screen.
After executing the build i am facing the following issue.
RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={summary=Summary must be less than 255 characters.}, errorMessages=[]}]}
at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.claim(DelegatingPromise.java:47)
at org.jenkinsci.plugins.JiraTestResultReporter.JiraUtils.createIssueInput(JiraUtils.java:114)
at org.jenkinsci.plugins.JiraTestResultReporter.JiraTestDataPublisher.raiseIssues(JiraTestDataPublisher.java:248)
at org.jenkinsci.plugins.JiraTestResultReporter.JiraTestDataPublisher.contributeTestData(JiraTestDataPublisher.java:187)
at hudson.tasks.junit.JUnitResultArchiver.parseAndAttach(JUnitResultArchiver.java:200)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:154)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1835)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={summary=Summary must be less than 255 characters.}, errorMessages=[]}]}
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:176)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:67)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:11)
at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:268)
at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:158)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:975)
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170)
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:268)
at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:158)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:975)
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170)
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:46)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:197)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:90)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:192)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Finished: FAILURE
The problem what I also fessing was ${DEFAULT_SUMMARY},which was more than
255
characters in title of JIRA create defect and that is why this issue was occurring.
I think you have to change the parameter of default summary to test name as follows so you won't this issue any more.
Before- ${DEFAULT_SUMMARY}
After- ${TEST_NAME}
Let me know if that works for you.

Jenkins plug-in install issues

I am trying to use Jenkins first time for automated deployments. Installed Jenkins and can't install plug-ins. I see below errors. Please advise.
Preparation
Checking internet connectivity
Checking update center connectivity
java.io.IOException: Server returned HTTP response code: 401 for URL: http://updates.jenkins-ci.org/update-center.json?uctest at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at hudson.model.UpdateCenter$UpdateCenterConfiguration.testConnection(UpdateCenter.java:905) at hudson.model.UpdateCenter$UpdateCenterConfiguration.checkUpdateCenter(UpdateCenter.java:718) at hudson.model.UpdateCenter$ConnectionCheckJob.run(UpdateCenter.java:1079) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110) at java.lang.Thread.run(Unknown Source)
MSBuild Plugin
Failure -
hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/msbuild/1.26/msbuild.hpi
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:821)

Jigomerge Failing in Jenkins build

Could anyone assist me with this Jigomerge error in Jenkins?
I'm sure its probably a config issue but I don't know what config to change.
Google searches showed Jira tickets that were closed with no comments on what fixed the issue.
class java.lang.RuntimeException # Failed to reset workspace !
java.lang.RuntimeException: Failed to reset workspace !
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at SvnMergeTool.resetWorkspace(script1000004.groovy:283)
at SvnMergeTool.launchSvnMerge(script1000004.groovy:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:704)
at SvnMergeTool.invokeMethod(script1000004.groovy)
at hudson.plugins.jigomerge.JigomergeBuilder.perform(JigomergeBuilder.java:101)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.build(MavenModuleSetBuild.java:864)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:620)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:462)
at hudson.model.Run.run(Run.java:1404)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Build step 'Perform svn merge with Jigomerge' changed build result to FAILURE
After finding the verbose indicator I looked at the output and noticed that the workspace that Jenkins and jigomerge were trying to update was missing part of the name. This was due to a space in the name of the folder: My CI build.
The name with spaces was seen as /root/.jenkins/My instead of /root/.jenkins/My\ CI\ build.
For this reason, the error that the file or directory did not exist was being returned, failing the merge.

Resources