New gradle plugin, attempting to publish or upload hpi for the 1st time

18 views
Skip to first unread message

ggillman ggillman

unread,
Jun 14, 2022, 2:51:34 PM6/14/22
to Jenkins Developers

Hi All,

 

I would be most appreciative for any guidance on how to proceed in publishing our gradle plugin manually for the first time.   I’ve tried using gradlew publish locally.   I’ve tried putting credentials in plaintext and also encrypted from the guidance I saw for maven plugins.  Both of them are returning a status code of 403.

 

The name of the plugin is ws-ctm-plugin

 

In the build.gradle file, this is what I have for the publishing definition:

 

publishing {
       
publications {
           
maven(MavenPublication) {
               
from components.java
            }
        }

       
repositories {
           
maven {
               
name
'jenkins'
               
if (project.version.toString().endsWith('-SNAPSHOT')) {
                    url System.
properties['jpi.snapshotRepoUrl'] ?: 'https://repo.jenkins-ci.org/snapshots'
               
} else {
                    url System.
properties['jpi.repoUrl'] ?: 'https://repo.jenkins-ci.org/releases'
               
}
                credentials {
                   
username =
"myusername"
                   
password = "I_tried_plaintext_and_encrypted"
               
}
            }
        }
    }

 

 

 

 

Prior to this I created a pull request to retrieve the necessary permissions for the yml file for our plugin.    https://github.com/jenkins-infra/repository-permissions-updater/pull/2587

 

That was completed.  

 

The error I’m receiving during this publish:

2022-06-13T10:11:11.174-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2022-06-13T10:11:11.174-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2022-06-13T10:11:11.174-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2022-06-13T10:11:11.174-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':publishMavenPublicationToJenkinsRepository'.
2022-06-13T10:11:11.174-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Failed to publish publication 'maven' to repository 'jenkins'
2022-06-13T10:11:11.174-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not PUT 'https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/ws-ctm-plugin/1.0.0.0/ws-ctm-plugin-1.0.0.0.pom'. Received status code 403 from server:
2022-06-13T10:11:11.174-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]

I see folders for other plugins - like ws-execution. I don't see a folder ws-ctm-plugin for this plugin

Thank you so much for any guidance.  If there is another way to publish for the 1st time, please share that also.

 

Glen

Daniel Beck

unread,
Jun 14, 2022, 4:02:16 PM6/14/22
to jenkin...@googlegroups.com
On Tue, Jun 14, 2022 at 8:51 PM 'ggillman ggillman' via Jenkins Developers <jenkin...@googlegroups.com> wrote:

2022-06-13T10:11:11.174-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not PUT 'https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/ws-ctm-plugin/1.0.0.0/ws-ctm-plugin-1.0.0.0.pom'. Received status code 403 from server:


Remove the -plugin suffix in your project settings to match the path you're allowed to upload to.
Reply all
Reply to author
Forward
0 new messages