kuberig icon indicating copy to clipboard operation
kuberig copied to clipboard

migrate to maven-central publishing

Open teyckmans opened this issue 4 years ago • 9 comments

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

teyckmans avatar Feb 07 '21 19:02 teyckmans

OSSRH-64213 created.

teyckmans avatar Feb 15 '21 18:02 teyckmans

DNS settings updated

teyckmans avatar Feb 15 '21 18:02 teyckmans

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. 

teyckmans avatar Feb 15 '21 18:02 teyckmans

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

szpak avatar Feb 15 '21 21:02 szpak

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 avatar Feb 18 '21 20:02 teyckmans

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: https://github.com/Kotlin/dokka/issues/41.

teyckmans avatar Feb 18 '21 20:02 teyckmans

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 avatar Feb 18 '21 20:02 teyckmans

@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 avatar Mar 24 '21 05:03 teyckmans

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...

teyckmans avatar Mar 24 '21 06:03 teyckmans