github-release-gradle-plugin icon indicating copy to clipboard operation
github-release-gradle-plugin copied to clipboard

Release succeeds even though asset upload fails

Open mduft opened this issue 4 years ago • 2 comments

I just hit this in our new automated release process :)

:githubRelease STATUS CREATED
07:30:19  :githubRelease https://github.com/bdeployteam/bdeploy/releases/tag/v2.0.0
07:30:19  :githubRelease UPLOADING ASSETS
07:30:19  :githubRelease UPLOADING /var/jenkins_home/workspace/Deployment Release/deployment/minion/build/distributions/bdeploy-linux64-2.0.0.zip
07:30:34  :githubRelease UPLOADING /var/jenkins_home/workspace/Deployment Release/deployment/minion/build/distributions/bdeploy-win64-2.0.0.zip
07:30:49  :githubRelease UPLOADING /var/jenkins_home/workspace/Deployment Release/deployment/api/build/libs/bdeploy-api-2.0.0-all.jar
07:30:49  :githubRelease FAILED TO UPLOAD bdeploy-api-2.0.0-all.jar
07:30:49  500 Internal Server Error
07:30:49  [message:Error saving asset, request_id:A3BC:6248:1A35E3:239973:5E65E298]
07:30:49  :githubRelease UPLOADING /var/jenkins_home/workspace/Deployment Release/deployment/api/build/openapi/BDeployAPI.yaml
07:30:50  :githubRelease UPLOADING /var/jenkins_home/workspace/Deployment Release/deployment/test-data/build/distribution/test-product-1-direct.zip
07:30:51  :githubRelease UPLOADING /var/jenkins_home/workspace/Deployment Release/deployment/test-data/build/distribution/test-product-2-direct.zip
07:30:51  
07:30:51  Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
07:30:51  Use '--warning-mode all' to show the individual deprecation warnings.
07:30:51  See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
07:30:51  
07:30:51  BUILD SUCCESSFUL in 1m 18s
07:30:51  48 actionable tasks: 21 executed, 27 up-to-date

Seems that an error from the server is not breaking the build as I would have expected it. It's not even easy for me to re-upload the asset(s) afterwards as the build & release is a Jenkins job...

mduft avatar Mar 09 '20 06:03 mduft

I have same for a case where a file was missing.

:githubRelease CANNOT UPLOAD version.txt with file size 0

This should fail the build IMO.

maxandersen avatar Oct 14 '20 22:10 maxandersen

I absolutely agree, any upload failure should stop the build.

Perhaps it's the catch (Exception e) { e.printStackTrace(); } on https://github.com/BreadMoirai/github-release-gradle-plugin/blob/master/src/main/groovy/com/github/breadmoirai/githubreleaseplugin/GithubReleaseTask.groovy#L138?

soundasleep avatar Aug 05 '22 01:08 soundasleep