Jenkins + Gradle + Artifactory插件(构建和部署成功,但最终结果失败)

5
我们最近设置了一个Jenkins任务,将生成的文件发布到Artifactory。
由于某种原因,插件似乎会导致该作业失败。部署是正确的,构建也成功完成。然而,最终结果是失败。
我们正在使用Gradle 2.8。
以下是Jenkins日志:
Jenkins Artifactory Plugin version: 2.4.7
[Warning] No Gradle build configured
+ export GRADLE_HOME=/root/gradle/gradle-2.8
+ export NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript
+ export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/gradle/gradle-2.8/bin:/usr/lib/oracle/12.1/client64/lib
+ gradle clean fC fM test jar artifactoryPublish
[build_86dm4wztwe32gv2is1jb93c3t$_run_closure3$_closure12$_closure13@1ef31f71][0][buildinfo] Properties file found at '/tmp/buildInfo766351637837418080.properties'
:cleanQuerydslSourcesDir
:clean
:initQuerydslSourcesDir
:compileQuerydslwarning: [options] bootstrap class path not set in conjunction with -source 1.7

//BLABLABLABLABLA

:compileJavawarning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:processResources
:classes
:compileTestJavawarning: [options] bootstrap class path not set in conjunction with -source 1.7

:processTestResources
:testClasses
:flywayClean
:flywayMigrate
:test
2016-04-05 09:53:53.338  INFO 10455 --- [       Thread-5] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@368edf2b: startup date [Tue Apr 05 09:52:46 UTC 2016]; root of context hierarchy
2016-04-05 09:53:53.351  INFO 10455 --- [       Thread-5] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
:jar
:generatePomFileForMavenJavaPublication
:artifactoryPublish
Deploying artifact: http://xxxxxxxxxxxxxxxxxx/artifactory/libs-release-local/xxxxxxxxxxxxxxxxxxxxxxxxxx.jar
Deploying artifact: http://xxxxxxxxxxxxxxxxxx/artifactory/libs-release-local/xxxxxxxxxxxxxxxxxxxxxxxxxx.pom
Deploying build descriptor to: http://xxxxxxxxxxxxxxxx/artifactory/api/build
Build successfully deployed. Browse it in Artifactory under http://xxxxxxxxxxxxxxxxxxxxxx/artifactory/webapp/builds/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/127

BUILD SUCCESSFUL

Total time: 1 mins 37.345 secs

This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.8/userguide/gradle_daemon.html
Finished: FAILURE

问题似乎是启用了Artifactory插件。如果我们不运行artifactoryPublish,最终结果仍将失败。然而,如果我们禁用Artifactory插件并仅构建项目,则一切都像魔法般地正常工作。
总结:
  • 插件 + 构建 + 发布 = 成功构建 + 成功发布 + 失败结果
  • 插件 + 构建 = 成功构建 + 失败结果
  • 构建 = 成功构建 + 成功结果
如有帮助我解决这个问题的任何想法,将不胜感激。
非常感谢。
1个回答

0

显然,这是Jenkins Gradle插件1.24的一个未解决问题:JENKINS-27632

当前的解决方法是回退到v1.23


谢谢RaGe。我已经尝试降级到v1.23,但仍然遇到了相同的错误。此外,不涉及Artifactory插件的其他构建都能够完美运行。这让我认为插件可能是问题的原因,但我没有找到任何相关信息。 - davidfm

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接