-
Notifications
You must be signed in to change notification settings - Fork 30
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
Ability to create and release staging repository in separate calls (e.g. after manual verification) #19
Comments
An output property sounds good for me. I'm not sure about the file. Where should it be kept (in |
Ideally, the plugin should be able to infer the staging repository id based on the comment. In other words: if user wants to release I believe that is the best approach as it won't add an accidental dependency on the local filesystem. |
I'd like to see this implemented as well. Ideally it would be implemented using the entire GAV (group:artifact:version) and not just the version. The reason is that some projects have a single account to publish more than one artifact. This would avoid problems for scenarios where two teams are publishing the same version but different artifacts at the same time. |
Thinking about it a bit more it is likely that the strategy needs to be able to be customized for a multi-module build to work. Perhaps it should default to group:version instead. |
…ven central (#1512) Until [this issue](gradle-nexus/publish-plugin#19) is resolved, gax cannot use nexus-publish to publish to maven central because the plugin do not persist stagingProfile information between command runs. Thus both the staging command and publish command has to be run in a single command. But, since gax has multiple modules(each modules gets staged in separate run) this is not a workable approach. So currently, the library gets staged to sonatype. Publish it manually from there(Get permission to publish if you frequently publish gax-java or @Neenu1995 can publish). A possible move to maven pom might be a better solution also.
I just noticed #36 added ability to configure repository description. So the missing bit is to add API to lookup the staging repository based on the description. |
Proposal by @vlsi placed originally here, extracted to a separate (this) issue.
I propose the following workflow:
Stage release artifacts
v1.0-rc1
. The version could be configured in the sources or passed via parameters (it does not matter)initializeStagingRepository
takes that version number, and puts it to the staging repository metadata. I'm not sure what are the possibilities, however, I'm sure the version can be put to the "comment" fieldinitializeStagingRepository
produces an@Output
withstagingRepositoryId
. It could save the id to file (files are commonly expected task inputs and outputs). It could provide the id viaProperty<String>
.Verify release
Publish release
The release manager remembers "release candidate version" to be released, and it passes that parameter to the build script.
4)
findStagingRepository(version=...)
task queries Nexus, and it detects the staging repository id. Then regularcloseRepositoryOrWhatever
task could be used to close&promote the repository.^^^ Note: the above is not something that must be used by everybody. It is just a sample.
Of course, one could combine all the tasks into a single Gradle execution.
In other words, I suggest using Nexus Server for storage of "repository id" rather than "repository extension".
The subsequent comment by @visi:
In 99.42% of the cases, users want reasonable comments for their staging repositories.
For instance, I have the following:
It corresponds to ~5 or so "release candidates".
The version tree between them looks as follows:
I have multiple "closed" repositories, and I can easily test each version individually, and later I can decide which one is better.
What if I want to promote
v3.0-rc5
as the final release?There's no clear way to tell which staging repository belongs to each RC number :(
On the other hand, if staging repositories did include user-provided reference (e.g. version number, git sha, or whatever else), then end user would be able to promote the relevant repository.
In other words, it would be possible to promote the release candidate by specifying a single
rc index
:./gradlew publishDist -Prc=5
Note: as you might guess, I have built a lot of different release candidates, and I probably did
./gradlew clean
in between. So I keepingrc index <-> staging repo id
link in thebuild
folder is not really an option.The text was updated successfully, but these errors were encountered: