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

The task findSonatypeStagingRepository is failing to match #310

Open
puneetbehl opened this issue Jan 26, 2024 · 5 comments
Open

The task findSonatypeStagingRepository is failing to match #310

puneetbehl opened this issue Jan 26, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@puneetbehl
Copy link

> Task :findSonatypeStagingRepository FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':findSonatypeStagingRepository'.
> No staging repositories found for stagingProfileId: ***, descriptionRegex: \b\Q:spring-security-cas:4.0.0\E(\s|$). Here are all the repositories: [ReadStagingRepository(repositoryId=orggrails-1346, type=closed, transitioning=false, description=:spring-security-cas:4.0.0)]

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
@szpak
Copy link
Contributor

szpak commented Jan 26, 2024

There might be the variety of reasons. Our, weekly running, e2e tests with that feature still works:

"nexus-publish-e2e-minimal",
"nexus-publish-e2e-minimal-ivy"

If you would like to get some help, please provide your project configuration and information from Nexus UI what is a description of existing staging repository(ies) at the moment of failure.

@puneetbehl
Copy link
Author

The configuration for the project can be found at https://github.com/grails/grails-spring-security-cas/blob/4.0.x/build.gradle

@szpak
Copy link
Contributor

szpak commented Feb 6, 2024

Thanks for the projects. It's strange, as there was a repository that should match:

Execution failed for task ':findSonatypeStagingRepository'.
No staging repositories found for stagingProfileId: ***, descriptionRegex: \b\Q:spring-security-cas:4.0.0\E(\s|$). Here are all the repositories: [ReadStagingRepository(repositoryId=orggrails-1346, type=closed, transitioning=false, description=:spring-security-cas:4.0.0)]

I've just checked our e2e tests and "it worked":

Fetching staging repositories for sonatype at https://oss.sonatype.org/service/local/, stagingProfileId '248647f1a45ed6'

Staging repository for sonatype at https://oss.sonatype.org/service/local/, stagingProfileId '248647f1a45ed6', descriptionRegex '\b\Qio.github.gradle-nexus-e2e:nexus-publish-e2e-minimal:0.0.2-unique-20240206-205900\E(\s|$)' is 'iogithubgradle-nexus-e2e-2709'

I will take a closer look at the regex, maybe there is any problem with it 🤔

@szpak szpak added bug Something isn't working and removed more info needed labels Feb 6, 2024
@szpak
Copy link
Contributor

szpak commented Feb 6, 2024

I think, I reproduced the problem in an automatic test. The problematic is leading ":". I will try handle also that case, but as a workaround, I propose to set "group" also in the root project or manually override the repository description:

nexusPublishing {
    repositoryDescription = "..."
    ...
}

where "..." can be your project name + current version.

@szpak
Copy link
Contributor

szpak commented Feb 6, 2024

What's somehow "sad"", it seems that our e2e tests detected the problem a year ago (#200), but I thought, it is a problem with "unspecified" instead of a version...

puneetbehl pushed a commit to grails/grails-views that referenced this issue Mar 14, 2024
Define `group` for rootProject so that nexus-publish plugin correctly matches staging repository via Gradle task `findSonatypeStagingRepo`.

This is suggested in gradle-nexus/publish-plugin#310.
puneetbehl pushed a commit to grails/grails-views that referenced this issue Mar 14, 2024
Define `group` for rootProject so that nexus-publish plugin correctly matches staging repository via Gradle task `findSonatypeStagingRepo`.

This is suggested in gradle-nexus/publish-plugin#310.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants