Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54698

Jenkins in Docker invoke gradle build failed after the local docker become a swarm manager


    • git

      I have successfully made a Jenkins gradle build, but today when I set the docker into swarm mode and let that machine become a swarm manager node, the same job couldn't build anymore. I tried to delete the '.gradle' directory in Jenkins data volume, but it doesn't help. It's hard to debug because there wasn't any useful log in the Jenkins build console.I tried several times and the log was all the same. Here is the log in Jenkins build console.

      //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

      Sometimes, it got this log:

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

      I tried updating the gradle version from 4.8 to 5.0 in jenkins, but it still show the same error log. Is there anyway to got the detail log? Maybe there is not any relation to "swarm or single host".

            Unassigned Unassigned
            jameszbl ZHENG BAO LE
            0 Vote for this issue
            1 Start watching this issue