Environment:
*Jib version: 3.1.2
*Build tool: Gradle v7.0.2
*OS: Ubuntu-18.04
*JDK 14,
*Java source/target compatibility 12
Description of the issue:
In a multi-project gradle project with the flag org.gradle.parallel=true, the execution of the top level jibDockerBuild target randomly fails for one of the projects.
This seems to be due to the parrallel nature of the build.
Steps to reproduce:
- Multi-project with at least 7 services built as docker containers
- gradle.properties set with parrallel execution
org.gradle.parallel=true
- build target jibDockerBuild or the root project
- Extract of the build log
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':project4:jibDockerBuild'.
com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: (null exception message)
Expected behavior:
Images for all projects created
Mitigation:
This workaround prevent the jibDockerBuild task from each individual project to run in parrallel using the jib.lock file
For each project enabling jib plugin:
// Make sure only one image is created at a time
// as it may cause to overload the socket and fail the build.
// This is done by identifying a common output file
jibDockerBuild.configure {
outputs.file "$rootDir/jib.lock"
}
Environment:
*Jib version: 3.1.2
*Build tool: Gradle v7.0.2
*OS: Ubuntu-18.04
*JDK 14,
*Java source/target compatibility 12
Description of the issue:
In a multi-project gradle project with the flag org.gradle.parallel=true, the execution of the top level jibDockerBuild target randomly fails for one of the projects.
This seems to be due to the parrallel nature of the build.
Steps to reproduce:
org.gradle.parallel=true
FAILURE: Build failed with an exception.
Execution failed for task ':project4:jibDockerBuild'.
Expected behavior:
Images for all projects created
Mitigation:
This workaround prevent the jibDockerBuild task from each individual project to run in parrallel using the jib.lock file
For each project enabling jib plugin:
// Make sure only one image is created at a time
// as it may cause to overload the socket and fail the build.
// This is done by identifying a common output file
jibDockerBuild.configure {
outputs.file "$rootDir/jib.lock"
}