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

migrate to maven-central publishing #39

Open
teyckmans opened this issue Feb 7, 2021 · 9 comments
Open

migrate to maven-central publishing #39

teyckmans opened this issue Feb 7, 2021 · 9 comments
Assignees
Labels
chore Other/Infra work

Comments

@teyckmans
Copy link
Collaborator

As jcenter is shutting down we need to replace our jcenter publishing with maven-central publishing

@teyckmans
Copy link
Collaborator Author

OSSRH-64213 created.

@teyckmans
Copy link
Collaborator Author

DNS settings updated

@teyckmans
Copy link
Collaborator Author

teyckmans commented Feb 15, 2021

Tried to sync one of the existing artifacts but our released artifacts don't appear to be valid for maven central.

Last Sync Errors:
    Invalid POM: /io/kuberig/dsl/kubernetes/kuberig-dsl-kubernetes-v1.18.10/0.1.4/kuberig-dsl-kubernetes-v1.18.10-0.1.4.pom: 
Project name missing, 
Project description missing, 
Project URL missing, 
License information missing, 
SCM URL missing, 
Developer information missing 
Missing: no javadoc jar found in folder '/io/kuberig/dsl/kubernetes/kuberig-dsl-kubernetes-v1.18.10/0.1.4' 
Missing Signature: '/io/kuberig/dsl/kubernetes/kuberig-dsl-kubernetes-v1.18.10/0.1.4/kuberig-dsl-kubernetes-v1.18.10-0.1.4-sources.jar.asc' does not exist for 'kuberig-dsl-kubernetes-v1.18.10-0.1.4-sources.jar'. 
Missing Signature: '/io/kuberig/dsl/kubernetes/kuberig-dsl-kubernetes-v1.18.10/0.1.4/kuberig-dsl-kubernetes-v1.18.10-0.1.4.pom.asc' does not exist for 'kuberig-dsl-kubernetes-v1.18.10-0.1.4.pom'. 
Missing Signature: '/io/kuberig/dsl/kubernetes/kuberig-dsl-kubernetes-v1.18.10/0.1.4/kuberig-dsl-kubernetes-v1.18.10-0.1.4.jar.asc' does not exist for 'kuberig-dsl-kubernetes-v1.18.10-0.1.4.jar'. 
Dropping existing partial staging repository. 

@szpak
Copy link

szpak commented Feb 15, 2021

Yes, the Maven Central is slightly more demanding than Bintray. You would need to tweak up your project configuration to handle that for your new artifacts. Here's a repo that can help you:
https://github.com/rwinch/gradle-publish-ossrh-sample

Or you can wait a liitle bit to have it updates to the brand new https://github.com/gradle-nexus/publish-plugin/ which makes it even easier. In the meantime, a separate migration guide (from the GNSP + NPP duo):
https://github.com/gradle-nexus/publish-plugin/wiki/Migration-from-gradle_nexus_staging-plugin---nexus_publish-plugin-duo

teyckmans pushed a commit to kuberig-io/kuberig-dsl that referenced this issue Feb 18, 2021
- update to kotlin 1.4.20 (align with Kotlin version in Gradle) to get rid of build warning.
- add dokka to generate javadoc artifacts (required by maven central)
- added additional plugins to make releasing to maven-central completely automatic.
- added signing plugin (conditionally on signing project property to be available).
- add required information to poms for all maven publications.
- moved plugin version management into Gradle settings file.
@teyckmans
Copy link
Collaborator Author

Done a first (manual) release of kuberig-dsl to maven-central with a 1.5.0-RC1 version number. Staged repository has been released and dropped so waiting for the sync.

@teyckmans
Copy link
Collaborator Author

dokka and some of it's transitive dependencies are not available on maven-central so had to keep jcenter in for the moment. I've added group limits for jcenter. In the mean time we need to keep track of the dokka issue for progress on this: Kotlin/dokka#41.

@teyckmans
Copy link
Collaborator Author

after the release hits maven central I can have a look on the kuberg-dsl-kubernetes / kuberig-dsl-openshift projects and the kuberig-dsl-vanilla-gradle plugin that is used in these projects. after that is done kuberig itself is up.

teyckmans pushed a commit to kuberig-io/kuberig-dsl that referenced this issue Feb 19, 2021
- provide signing details to build
@teyckmans
Copy link
Collaborator Author

@szpak ok I feel exceptionally stupid, spending way too much time on this. Just doesn't want to work in the CI jobs, always results in a 401 when trying to create the staging profile. While locally it just works even when I exec into the gitlab runner container and execute manually it works.

tried the following without success:

  • use CI env vars with format ORG_GRADLE_PROJECT_xxx environment variables
  • use CI env vars and write them to gradle.properties file using bash script
  • use CI env vars and write them to gradle.properties file using a custom task in the gradle build
  • added a sleep in the CI job so I could exec into the runner, when I execute manually it works inside the gitlab job container.
  • mainly tried on gitlab, also tried github actions same deal.

@teyckmans
Copy link
Collaborator Author

ok just tested the staging repo create with a custom task and it works in the job. Didn't change anything on the environment variables...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Other/Infra work
Projects
Development

No branches or pull requests

2 participants