Bamboo构建失败,但报告成功完成

时间:2019-11-24 23:20:57

标签: gradle build.gradle artifactory bamboo gradlew

我正在使用Atlassian Bamboo版本6.9.2构建60911,并尝试使用Artifactory Gradle任务执行gradle构建。这是工件gradle任务的设置,真的没什么特别的: enter image description here

源代码存储库已生成gradle包装器 enter image description here

但是当我运行构建时,我得到了这个奇怪的NullPointerException:

25-Nov-2019 09:52:13    > Task :clean
25-Nov-2019 09:52:13    > Task :compileJava
25-Nov-2019 09:52:14    > Task :processResources
25-Nov-2019 09:52:14    > Task :classes
25-Nov-2019 09:52:20    > Task :bootJar
25-Nov-2019 09:52:20    > Task :jar SKIPPED
25-Nov-2019 09:52:20    > Task :assemble
25-Nov-2019 09:52:20    > Task :compileTestJava NO-SOURCE
25-Nov-2019 09:52:20    > Task :processTestResources NO-SOURCE
25-Nov-2019 09:52:20    > Task :testClasses UP-TO-DATE
25-Nov-2019 09:52:20    > Task :test NO-SOURCE
25-Nov-2019 09:52:20    > Task :check UP-TO-DATE
25-Nov-2019 09:52:20    > Task :build
25-Nov-2019 09:52:21    > Task :copyScriptsToTemp
25-Nov-2019 09:52:34    > Task :createRpm
25-Nov-2019 09:52:34    
25-Nov-2019 09:52:34    Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
25-Nov-2019 09:52:34    Use '--warning-mode all' to show the individual deprecation warnings.
25-Nov-2019 09:52:34    See https://docs.gradle.org/5.6.2/userguide/command_line_interface.html#sec:command_line_warnings
25-Nov-2019 09:52:34    
25-Nov-2019 09:52:34    BUILD SUCCESSFUL in 21s
25-Nov-2019 09:52:34    6 actionable tasks: 6 executed
25-Nov-2019 09:52:34    Error occurred while running Task 'Build(2)' of type org.jfrog.bamboo.bamboo-artifactory-plugin:artifactoryGradleTask.
25-Nov-2019 09:52:34    java.lang.NullPointerException
25-Nov-2019 09:52:34    Running post build plugin 'NCover Results Collector'
25-Nov-2019 09:52:34    Running post build plugin 'Artifact Copier'
25-Nov-2019 09:52:34    Running post build plugin 'Artifactory Release Management Staging'
25-Nov-2019 09:52:34    Running post build plugin 'Artifactory Build Info Copier'
25-Nov-2019 09:52:34    Running post build plugin 'Artifactory Gradle Properties Info Copier'
25-Nov-2019 09:52:34    Running post build plugin 'npm Cache Cleanup'
25-Nov-2019 09:52:34    Running post build plugin 'Clover Results Collector'
25-Nov-2019 09:52:34    Running post build plugin 'Docker Container Cleanup'
25-Nov-2019 09:52:34    Finalising the build...
25-Nov-2019 09:52:34    Stopping timer.
25-Nov-2019 09:52:34    Build DEV-MR-BUIL-8 completed.
25-Nov-2019 09:52:34    Running on server: post build plugin 'NCover Results Collector'
25-Nov-2019 09:52:34    Running on server: post build plugin 'Build Hanging Detection Configuration'
25-Nov-2019 09:52:34    Running on server: post build plugin 'Bamboo project link creator'
25-Nov-2019 09:52:34    Running on server: post build plugin 'Clover Delta Calculator'
25-Nov-2019 09:52:34    Running on server: post build plugin 'Maven Dependencies Postprocessor'
25-Nov-2019 09:52:34    All post build plugins have finished
25-Nov-2019 09:52:34    Generating build results summary...
25-Nov-2019 09:52:34    Saving build results to disk...
25-Nov-2019 09:52:34    Logging substituted variables...
25-Nov-2019 09:52:34    Indexing build results...
25-Nov-2019 09:52:34    Finished building DEV-MR-BUIL-8.

我可以看到输出BUILD SUCCESSFUL in 21s,但是之后立即看到java.lang.NullPointerException,构建结果是失败。有什么想法吗?

更新: 我设法获得了堆栈跟踪:

-Nov-2019 11:45:16  BUILD SUCCESSFUL in 12s
25-Nov-2019 11:45:16    6 actionable tasks: 6 executed
25-Nov-2019 11:45:16    Error occurred while running Task 'Build(2)' of type org.jfrog.bamboo.bamboo-artifactory-plugin:artifactoryGradleTask.
25-Nov-2019 11:45:16    java.lang.NullPointerException
25-Nov-2019 11:45:16            at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77)
25-Nov-2019 11:45:16            at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
25-Nov-2019 11:45:16            at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
25-Nov-2019 11:45:16            at java.nio.file.Paths.get(Paths.java:84)
25-Nov-2019 11:45:16            at org.jfrog.bamboo.util.buildInfo.BuildInfoHelper.addBuildInfoFromFileToContext(BuildInfoHelper.java:243)
25-Nov-2019 11:45:16            at org.jfrog.bamboo.task.ArtifactoryTaskType.addBuildInfo(ArtifactoryTaskType.java:232)
25-Nov-2019 11:45:16            at org.jfrog.bamboo.task.ArtifactoryGradleTask.execute(ArtifactoryGradleTask.java:151)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$2(TaskExecutorImpl.java:317)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:252)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:317)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:204)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:176)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:131)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:125)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:127)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
25-Nov-2019 11:45:16            at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
25-Nov-2019 11:45:16            at java.lang.Thread.run(Thread.java:748)

0 个答案:

没有答案