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
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/500c36bb-d495-4088-88f5-c4418c6225d1n%40googlegroups.com.