-
Bug
-
Resolution: Unresolved
-
Major
When run via Jenkins pipeline, if a Gradle task fails or Gradle exits with a non-zero exit code, this line swallows the error message:
This makes it extremely difficult to troubleshoot failed builds, especially as you start to mix in other things like the Docker plugin, etc. Reproducing the build is not trivial.
The full error details should be displayed in the Jenkins console log.
[JENKINS-55267] A failed Gradle task does not log any of the error details
Issue Type | Original: New Feature [ 2 ] | New: Bug [ 1 ] |
Description |
Original:
If a Gradle task fails or Gradle exits with a non-zero exit code, this line swallows the error message: [https://github.com/jenkinsci/artifactory-plugin/blob/master/src/main/java/org/jfrog/hudson/pipeline/steps/ArtifactoryGradleBuild.java#L184] This makes it extremely difficult to troubleshoot failed builds, especially as you start to mix in other things like the Docker plugin, etc. Reproducing the build is not trivial. The full error details should be displayed in the Jenkins console log. |
New:
When run via Jenkins pipeline, if a Gradle task fails or Gradle exits with a non-zero exit code, this line swallows the error message: [https://github.com/jenkinsci/artifactory-plugin/blob/master/src/main/java/org/jfrog/hudson/pipeline/steps/ArtifactoryGradleBuild.java#L184] This makes it extremely difficult to troubleshoot failed builds, especially as you start to mix in other things like the Docker plugin, etc. Reproducing the build is not trivial. The full error details should be displayed in the Jenkins console log. |
Here's a snippet from the console log. The gradle build is run from within a Docker container using the Docker pipeline plugin.
When we change the job to publish using Gradle directly instead of the plugin, we get an error from Gradle itself telling us what the problem is, namely that it's looking for a JAR file that doesn't exist: