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

Explain and document the staging repository isolation #63

Closed
mockitoguy opened this issue Feb 21, 2021 · 1 comment · Fixed by #64
Closed

Explain and document the staging repository isolation #63

mockitoguy opened this issue Feb 21, 2021 · 1 comment · Fixed by #64
Labels
documentation Improvements or additions to documentation

Comments

@mockitoguy
Copy link
Contributor

Nice plugin! (again!)

How does this plugin handle parallel publications from different GitHub projects that share the same group id, and publish to the same nexus repo (nexus oss)? Let's call it "staging repository isolation" use case.

Let's make it a little more concrete. In Mockito we have "org.mockito:mockito-kotlin" and "org.mockito:mockito-scala". Those are separate GH projects with independent release cycles. We have a strong preference to keep the same group "org.mockito" (branding, compatibility). What happens if both of those projects use the publish-plugin, and trigger release at the same time, to the same nexus repo (OSS sonatype)? Specifically, will the project use separate staging repositories?

Ask: please document this use case :) ping @szpak

@szpak
Copy link
Contributor

szpak commented Feb 21, 2021

In general, every publishing explicitly creates a new staging repository. If you call publishToSonatype closeAndReleaseSonatypeStagingRepository together, the closing and release operations will know which repository should be closed. It should cover the majority of cases.

For people with more complex release process (such as formal acceptation of the artifacts released to a (already closed) staging repository), the is a discussion about possible implementation in #19.

Having that knowledge, maybe you would like to provide a PR with improved explanation in README (in the way is - in your opinion - would be suitable for the users)? ;-)

P.S. There is one important Nexus-related (not just Gradle-related) issue which you need to be aware of. Having everything in the same group (package) imposes that user with permission to publishing to that group (in fact to the same staging profile using the Nexus domain) would be allowed to publish to every project in that group (so misconfigured mockito-kotlin could appear as mockito-core). Nevertheless, with a separate user used on a CI server with no user reversible access token, the risk of "mistake" is lower.

@szpak szpak closed this as completed in #64 Feb 22, 2021
szpak pushed a commit that referenced this issue Feb 22, 2021
@szpak szpak added the documentation Improvements or additions to documentation label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants