java.lang.NullPointerException when Zypher is publishing report to JIRA - jenkins

I use a reportng format to publish the report to the Jira, but I am seeing the nullpointer exception:
java.lang.NullPointerException
at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.executeTests(TestCaseUtil.java:424)
at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:564)
at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:99)
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:1749)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:421)
Build step 'Publish test result to Zephyr for JIRA' marked build as failure
Finished: FAILURE
Do you know why? Or how to fix it?

It seems like an ongoing issue in the Jenkins community. You can subscribe to their JIRA feed for further updates.

Related

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.

AutoDeploy Jenkins, Payara

I want an automated deploy to payara server with Jenkins, but I don't know how to achieve this. Could someone please help me?
Maybe I should use docker or any other application to make this job. I used the plugin "deploy war/ear" but this was the error:
C:\Program Files (x86)\Jenkins\workspace\pp1>exit 0
Deploying C:\Program Files (x86)\Jenkins\workspace\pp1\target\despliegue1-1.0-SNAPSHOT.war to container GlassFish 3.x Remote with context
ERROR: Build step failed with exception
org.glassfish.api.admin.InvalidCommandException: V3 cannot process this command at this time, please wait
at com.sun.enterprise.admin.remote.RemoteAdminCommand.fetchCommandModel(RemoteAdminCommand.java:1152)
at com.sun.enterprise.admin.remote.RemoteAdminCommand.getCommandModel(RemoteAdminCommand.java:330)
at com.sun.enterprise.admin.cli.remote.RemoteCommand.prepare(RemoteCommand.java:297)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:242)
at com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput(RemoteCommand.java:389)
at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:117)
Caused: java.lang.RuntimeException
at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:121)
at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:704)
Caused: java.lang.RuntimeException: error submitting remote command
at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:735)
at org.glassfish.deployment.client.AbstractDeploymentFacility.listTargets(AbstractDeploymentFacility.java:693)
at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:169)
Caused: java.lang.IllegalStateException: error submitting remote command
at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:171)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:439)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:197)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)
at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:147)
at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:117)
at hudson.FilePath.act(FilePath.java:1077)
at hudson.FilePath.act(FilePath.java:1060)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)
at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
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:1840)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Deploy war/ear to a container' marked build as failure
Finished: FAILURE

Parameterized Remote Trigger is not triggering the remote jenkins job

There are 2 Jenkins A and B. I am triggering Job in A Jenkins and after the build is succeeded, it should trigger a Job in B Jenkins using Remote Parameterized Job (Parameterized Remote Trigger) plugin.
I am using the Jenkins and plugin version as follows:
Jenkins A version - 2.107.2
Jenkins B version - 2.73.3
Parameterized Remote Trigger version - 2.2.2
When i triggered build job in A Jenkins, it is triggering only 1 build job in B Jenkins (In that particular folder there will be 6 build jobs and all of them has to get triggered) and then it is failing with the below mentioned issue.
java.lang.NullPointerException
at java.io.Reader.<init>(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.sendHTTPCall(RemoteBuildConfiguration.java:980)
10:33:04 at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.sendHTTPCall(RemoteBuildConfiguration.java:799)
10:33:04 at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.perform(RemoteBuildConfiguration.java:556)
10:33:04 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
10:33:04 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
10:33:04 at hudson.model.Build$BuildExecution.build(Build.java:206)
10:33:04 at hudson.model.Build$BuildExecution.doRun(Build.java:163)
10:33:04 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
10:33:04 at hudson.model.Run.execute(Run.java:1727)
10:33:04 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
10:33:04 at hudson.model.ResourceController.execute(ResourceController.java:97)
10:33:04 at hudson.model.Executor.run(Executor.java:429)
10:33:04 Build step 'Trigger a remote parameterized job' marked build as failure
Any help would be really appreciated. Thank you.
The above issue got resolved once we have updated the plugin "Parameterized Remote Trigger" to 3.0.3 and provide the root URL of Jenkins B in Jenkins A configuration and provide the rest of the path till the Job is present in the Remote Job Name or URL parameter and hence the above issue got resolved.

Jenkins and github commit statuses

I am having issues getting GitHub to talk to Jenkins after an upgrade to our private GitHub.
I had the webhooks setup and everything was working till the upgrade now I am getting the following error in the logs
ERROR: [GitHub Commit Status Setter] Failed to update commit state on
GitHub. Ignoring exception [{"message":"Not
Found","documentation_url":"https://developer.github.com/enterprise/2.11/v3"}]
has anyone seen this issue before?
Added Job:
Added error log:
ERROR: Build step failed with exception
java.io.FileNotFoundException: <redacted URL>
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
at org.kohsuke.github.Requester.parse(Requester.java:612)
at org.kohsuke.github.Requester.parse(Requester.java:594)
at org.kohsuke.github.Requester._to(Requester.java:272)
Caused: org.kohsuke.github.GHFileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/enterprise/2.11/v3"}
at org.kohsuke.github.Requester.handleApiError(Requester.java:686)
at org.kohsuke.github.Requester._to(Requester.java:293)
at org.kohsuke.github.Requester.to(Requester.java:234)
at org.kohsuke.github.GHRepository.createCommitStatus(GHRepository.java:1075)
at org.jenkinsci.plugins.github.status.GitHubCommitStatusSetter.perform(GitHubCommitStatusSetter.java:160)
Caused: org.jenkinsci.plugins.github.common.CombineErrorHandler$ErrorHandlingException
at org.jenkinsci.plugins.github.common.CombineErrorHandler.handle(CombineErrorHandler.java:74)
at org.jenkinsci.plugins.github.status.GitHubCommitStatusSetter.perform(GitHubCommitStatusSetter.java:164)
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:1819)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
I think you should update the status result

Jenkins rally plugin not working

I am using rally plugin with jenkins and on running the build i am getting below error
rally update plug-in error: could not update changeset entry: null
com.jenkins.plugins.rally.RallyAssetNotFoundException
at com.jenkins.plugins.rally.utils.RallyQueryBuilder.andExecuteReturningRef(RallyQueryBuilder.java:65)
at com.jenkins.plugins.rally.connector.RallyConnector.createRepository(RallyConnector.java:187)
at com.jenkins.plugins.rally.service.RallyService.updateChangeset(RallyService.java:46)
at com.jenkins.plugins.rally.RallyPlugin.perform(RallyPlugin.java:109)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1037)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
rally update plug-in error: could not update TaskDetails entry: null
com.jenkins.plugins.rally.RallyAssetNotFoundException
at com.jenkins.plugins.rally.utils.RallyQueryBuilder.andExecuteReturningObject(RallyQueryBuilder.java:84)
at com.jenkins.plugins.rally.connector.RallyConnector.queryForTaskById(RallyConnector.java:107)
at com.jenkins.plugins.rally.service.RallyService.getTaskObjectByStoryRef(RallyService.java:140)
at com.jenkins.plugins.rally.service.RallyService.updateRallyTaskDetails(RallyService.java:108)
at com.jenkins.plugins.rally.RallyPlugin.perform(RallyPlugin.java:117)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1037)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
rally update plug-in error: could not update changeset entry: null
com.jenkins.plugins.rally.RallyAssetNotFoundException
at com.jenkins.plugins.rally.utils.RallyQueryBuilder.andExecuteReturningRef(RallyQueryBuilder.java:65)
at com.jenkins.plugins.rally.connector.RallyConnector.createRepository(RallyConnector.java:187)
at com.jenkins.plugins.rally.service.RallyService.updateChangeset(RallyService.java:46)
at com.jenkins.plugins.rally.RallyPlugin.perform(RallyPlugin.java:109)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1037)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
rally update plug-in error: could not update TaskDetails entry: null
com.jenkins.plugins.rally.RallyAssetNotFoundException
at com.jenkins.plugins.rally.utils.RallyQueryBuilder.andExecuteReturningObject(RallyQueryBuilder.java:84)
at com.jenkins.plugins.rally.connector.RallyConnector.queryForTaskById(RallyConnector.java:107)
at com.jenkins.plugins.rally.service.RallyService.getTaskObjectByStoryRef(RallyService.java:140)
at com.jenkins.plugins.rally.service.RallyService.updateRallyTaskDetails(RallyService.java:108)
at com.jenkins.plugins.rally.RallyPlugin.perform(RallyPlugin.java:117)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1037)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Build step 'Update Rally Task and ChangeSet' marked build as failure
Finished: FAILURE
My commit message was :
US109 for task TA52 with status: in progress
I am not getting what wrong i am doing.Let me know if any additional info is required.
I am the maintainer of that plugin.
This happens when the credentials you're using to access CA (née Rally) don't have permission to create a Changeset object on the Work Item you referenced (US109). The quick fixes are to make sure your Work Items belong to a Project to which your credential user has access to, or have an administrator grant your credential user access to more Projects.
I'm currently working on making the exception into a silent failure (i.e. the logs will show that the Changeset wasn't created but the build won't fail because of it).
If you have any more issues please feel free to file a report on the plugin's website. Sorry for the poor error message!

Resources