Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop repository when build fails #410

Merged
merged 2 commits into from Sep 9, 2022
Merged

drop repository when build fails #410

merged 2 commits into from Sep 9, 2022

Conversation

gabrielittner
Copy link
Collaborator

Makes an attempt to drop the created staging repository in case of build failures. This is on a best effort basis and a failure to drop the repo will be silently ignored.

closes #406

} else {
try {
nexus.dropStagingRepository(stagingRepositoryId)
} catch (_: IOException) {}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we log it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the build fails people often jump to the last message that looks like an error which in this case would be misleading because this didn't fail the build. Maybe as an info level log? Then you could find out about it when running with --info but by default Gradle doesn't print it

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

@gabrielittner gabrielittner merged commit 0db5be2 into master Sep 9, 2022
@gabrielittner gabrielittner deleted the drop-repository branch September 9, 2022 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop an automatically created sonatype staging repo if there is a build failure
2 participants