本地Docker成为集群管理器后,Docker中的Jenkins调用gradle构建失败

时间:2018-11-18 14:10:34

标签: docker jenkins gradle

我已经成功地进行了Jenkins gradle构建,但是今天,当我将docker设置为swarm模式并让该计算机成为swarm管理器节点时,无法再执行同一工作。我试图删除Jenkins数据卷中的“ .gradle”目录,但这无济于事。调试很困难,因为Jenkins构建控制台中没有任何有用的日志,我尝试了几次,日志都一样。这是Jenkins构建控制台中的日志。

Started by user James
Building in workspace /var/jenkins_home/workspace/demo
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://gitee.com/zbl1996/ci-demo.git # timeout=10
Fetching upstream changes from https://gitee.com/zbl1996/ci-demo.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials Gitee username and password
 > git fetch --tags --progress https://gitee.com/zbl1996/ci-demo.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 37fde409178acb3780b6c2bf51cb2e3a31c82278 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 37fde409178acb3780b6c2bf51cb2e3a31c82278
Commit message: "ignore"
 > git rev-list --no-walk 37fde409178acb3780b6c2bf51cb2e3a31c82278 # timeout=10
[Gradle] - Launching build.
[demo] $ /var/jenkins_home/workspace/demo/gradlew build
Downloading https://services.gradle.org/distributions/gradle-4.8-bin.zip

........................................................................

Welcome to Gradle 4.8!

Here are the highlights of this release:
 - Dependency locking
 - Maven Publish and Ivy Publish plugins improved and marked stable
 - Incremental annotation processing enhancements
 - APIs to configure tasks at creation time

For more details see https://docs.gradle.org/4.8/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE

有时,它会收到以下日志:

Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details

我尝试在jenkins中将gradle版本从4.8更新到5.0,但是仍然显示相同的错误日志。 反正有没有获取详细日志?

0 个答案:

没有答案