refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

Throw exception / cancel build instead of adding failureComment

Open jschneider opened this issue 3 years ago • 2 comments

The current behavior if a repository is unreachable:

  • adding a comment into the version.properties:

e.g.

failed to check repo https://plugins.gradle.org/m2/ Cause: network or server issue (class javax.net.ssl.SSLHandshakeException PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed)

But the build finishes successfully.

I would prefer refreshVersions to throw an exception and fail the build.

Reasoning: I have automated refreshVersions in the CI pipeline. And those comments could end up being merged into "main".

jschneider avatar Nov 26 '22 15:11 jschneider

That was the initial behavior, but we changed it because it was a pain when one of the repos wasn't working.

We won't change it back, but we might consider adding an option for your use case. Any idea on the naming and configuration location?

LouisCAD avatar Nov 27 '22 14:11 LouisCAD

I started implementing this feature. But didn't find a good way to get the configuration into Write versions candidates using latest most stable version and get it

I didn't want to add a parameter - but probably it is necessary...

jschneider avatar Nov 27 '22 15:11 jschneider