Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #411
Closed
Open
Issue created Jun 28, 2018 by Administrator@rootContributor

CI: Rework publish pipeline for "openapi-generator-gradle-plugin"

Created by: jmini

The automated deploy of the openapi-generator-gradle-plugin is not working.

With 3.0.1 and 3.0.2 there was a TravisCI timeout in the job. With 3.0.3 the TravisCI Job is OK.

Log: https://api.travis-ci.org/v3/job/397359374/log.txt

Maven deploy:

Source: https://github.com/OpenAPITools/openapi-generator/blob/9b909df543b8c541a17aa5a545473e6e511b140d/.travis.yml#L108-L109

Log Extract: end of the maven deploy step:

Finished mvn clean deploy for master

Gradle Uplaoad:

Source: https://github.com/OpenAPITools/openapi-generator/blob/9b909df543b8c541a17aa5a545473e6e511b140d/.travis.yml#L112-L113

Log Extract for the uploadArchives task:

~/build/OpenAPITools/openapi-generator ~/build/OpenAPITools/openapi-generator

Welcome to Gradle 4.7!

Here are the highlights of this release:
 - Incremental annotation processing
 - JDK 10 support
 - Grouped non-interactive console logs
 - Failed tests are re-run first for quicker feedback

For more details see https://docs.gradle.org/4.7/release-notes.html

> Task :compileKotlin UP-TO-DATE
> Task :compileJava NO-SOURCE
> Task :pluginDescriptors UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :javadoc NO-SOURCE
> Task :javadocJar UP-TO-DATE
> Task :sourcesJar UP-TO-DATE
> Task :signArchives
> Task :uploadArchives

BUILD SUCCESSFUL in 3m 42s
8 actionable tasks: 2 executed, 6 up-to-date
Finished ./gradlew uploadArchives

The artefacts were uploaded to Nexus. But a look in the Staging repository show multiple staging repo:

https://oss.sonatype.org/#stagingRepositories

Nexus

Content of the different repos:

  • openapitools-1031 contains only:
    • /org/openapitools/openapi-generator-gradle-plugin/3.0.3/openapi-generator-gradle-plugin-3.0.3.pom.asc.md5
  • openapitools-1030 contains:
    • /org/openapitools/openapi-generator-gradle-plugin/3.0.3/openapi-generator-gradle-plugin-3.0.3-javadoc.jar.sha1
    • /org/openapitools/openapi-generator-gradle-plugin/3.0.3/openapi-generator-gradle-plugin-3.0.3-sources.jar
    • /org/openapitools/openapi-generator-gradle-plugin/3.0.3/openapi-generator-gradle-plugin-3.0.3.jar.asc.md5
  • … and so on
  • openapitools-1024

This is a known issue:

https://issues.sonatype.org/browse/OSSRH-37302?attachmentViewMode=list


I see multiple solutions:

1/ Use the nexus-staging-maven-plugin:

My understanding (see also #366) is that if we manage to install the artifacts (jars, pom, signature files) to <root repo>/target/nexus-staging/deferred/ during the maven build (as a regular step of the openapi-generator-gradle-plugin-mvn-wrapper project) then it will be uploaded in one step at the end of the build.

This is more or less what is recommended in OSSRH-37302

2/ Switch CI Server. According to @jimschubert there is no problem with GitLab-CI

3/ Switch Staging server.

  • Deploy to Bintray (instead of Sonatype Nexus)
  • From Bintray to JCenter and Maven Central (one click)

Bintray is free for Open Source project.

I think that a lot of projects using gradle are using Bintray. I think that AsciidoctorJ is doing it like this.

Assignee
Assign to
Time tracking