Currently, the build produces a confusing "BUILD FAILED" message for ordinary builds that skip release (full log):
[assertReleaseNeeded] :assertReleaseNeeded FAILED
[assertReleaseNeeded]
[assertReleaseNeeded] FAILURE: Build failed with an exception.
[assertReleaseNeeded]
[assertReleaseNeeded] * What went wrong:
[assertReleaseNeeded] Execution failed for task ':assertReleaseNeeded'.
[assertReleaseNeeded] > Skipping release because publications are identical.
[assertReleaseNeeded]
[assertReleaseNeeded] * Try:
[assertReleaseNeeded] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[assertReleaseNeeded]
[assertReleaseNeeded] BUILD FAILED in 8s
[assertReleaseNeeded] 6 actionable tasks: 4 executed, 2 up-to-date
[assertReleaseNeeded]
When the build works on, the log file should not contain messages such as "BUILD FAILED".
Solution
Currently, ciPerformRelease task executes assertReleaseNeeded and stops further execution if the latter fails. Let's change is so that instead of using build failure as signal, we use a marker file as signal. Let's make the releaseNeeded task produce a marker file like "build/release-needed-marker.txt". Then, ciPerformRelease task would stop execution when the marker file is absent.
Marker file needs to be deleted first thing that releaseNeeded does.
Problem
Currently, the build produces a confusing "BUILD FAILED" message for ordinary builds that skip release (full log):
When the build works on, the log file should not contain messages such as "BUILD FAILED".
Solution
Currently,
ciPerformRelease
task executesassertReleaseNeeded
and stops further execution if the latter fails. Let's change is so that instead of using build failure as signal, we use a marker file as signal. Let's make thereleaseNeeded
task produce a marker file like "build/release-needed-marker.txt". Then,ciPerformRelease
task would stop execution when the marker file is absent.Marker file needs to be deleted first thing that
releaseNeeded
does.Getting started
assertReleaseNeeded
wiring tociPerformRelease
and use ofstopExecution()
method: https://github.com/mockito/shipkit/blob/b84221b03b8dd8b53daad05fa028f54fcdf978e5/subprojects/shipkit/src/main/groovy/org/shipkit/internal/gradle/release/CiReleasePlugin.java#L54Implementing this feature would make the build logs much cleaner!!!