jenkins-infra / helpdesk

Open your Infrastructure related issues here for the Jenkins project
https://github.com/jenkins-infra/helpdesk/issues/new/choose
16 stars 10 forks source link

Unable to deploy .hpi file in artifactory (even with accepted permissions/plugin-zos-devops.yml) #3279

Closed IBA-mainframe-dev closed 1 year ago

IBA-mainframe-dev commented 1 year ago

Type(s) of account issue

Other (please describe in the summary below)

Summary

Hello! I wanted to finally place the plugin in the Jenkins-plugins hub by uploading the source code and the built .hpi file to the Jenkins JFrog artifactory. Jenkins JFrog URL, where I was going to deploy: https://repo.jenkins-ci.org/artifactory/releases/io/jenkins/plugins/zdevops/1.0.0/zdevops.hpi image

I managed to upload several files there (such as zdevops-1.0.0-sources.jar, zdevops-1.0.0-javadoc.jar and zdevops-1.0.0.jar), except for one - zdevops.hpi. For some reason, only for zdevops.hpi writes that: "User iba_mainframe_dev is not permitted to deploy 'io/jenkins/plugins/zdevops/1.0.0/zdevops.hpi' into 'releases:io/jenkins/plugins/zdevops/1.0.0/zdevops.hpi'." image

Although the corresponding .yaml file with permissions has been created and lies in repository-permissions-updater repo. Also link to related permissions file: https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/plugin-zos-devops.yml

Could you please take a look, maybe I'm doing something wrong or is there some other problem? (first time deploying a plugin, maybe I have missed something in the process) Also plugin original repo under jenkinsci: https://github.com/jenkinsci/zos-devops-plugin Thanks in advance!

jenkins.io account username

IBA_mainframe_dev

jenkins.io account email

IAbnitski@ibagroup.eu

Which URL are you trying to login at?

https://repo.jenkins-ci.org/artifactory/releases/io/jenkins/plugins/zdevops/1.0.0/zdevops.hpi

NotMyFault commented 1 year ago

Take a look at https://www.jenkins.io/doc/developer/publishing/releasing/ how to perform a release of your plugin using the maven release plugin.

Typically, you don't upload files by hand.

NotMyFault commented 1 year ago

dduportal assigned dduportal and NotMyFault

I doubt I can be much of a help here. The plugin uses the gradle JPI plugin, which ultimately doesn't use the MRP, I'm also not aware of how to release Jenkins plugins using Gradle at all, aside from manually uploading files. Doesn't the JPI plugin have some sort of build-in release assistant?

dduportal commented 1 year ago

dduportal assigned dduportal and NotMyFault

I doubt I can be much of a help here. The plugin uses the gradle JPI plugin, which ultimately doesn't use the MRP, I'm also not aware of how to release Jenkins plugins using Gradle at all, aside from manually uploading files. Doesn't the JPI plugin have some sort of build-in release assistant?

My bad @NotMyFault , I added you by mistake

dduportal commented 1 year ago

Hi @IBA-mainframe-dev , what is the result if you follow the instructions at https://www.jenkins.io/doc/developer/publishing/releasing-manually/ (as pointed by @NotMyFault on previous comments)?

IBA-mainframe-dev commented 1 year ago

Hello @dduportal, previously, when trying to upload artifacts via CURL, it gave an error as shown in the second screenshot in the description of this issue (there is also an example of the issued CURL command). There was also an error like 403 when trying to download artifacts via the "Deploy" button in the web-ui JFrog interface. However, I just tried to upload the .hpi file again via "Deploy" button in the artifactory web interface, and it loaded successfully (maybe you configured something - thanks!). Previously, I only managed to upload several files there (such as zdevops-1.0.0-sources.jar, zdevops-1.0.0-javadoc.jar and zdevops-1.0.0.jar).

  1. And now the question is, in theory, all necessary files are now placed in: https://repo.jenkins-ci.org/ui/repos/tree/General/releases/io/jenkins/plugins/zdevops/1.0.0 and Jenkins will pull up the .hpi file that has appeared and the plugin will become available in https://plugins.jenkins.io/?
  2. Are there any additional steps required for the release? And how soon will the plugin become available?
  3. And another question, while we are using Gradle, however, we have completed a few more features for the plugin, and when it needs to be updated - will there be access to overwrite files? Because at the moment it does not seem to exist, but while the plugin uses Gradle, CD automation is not available.

We will try to remake the project to use Maven in nearest time, but Gradle is still used - plugin needs to be updated somehow :) Thanks in advance!

dduportal commented 1 year ago

Hi @IBA-mainframe-dev , thanks a lot for the feedback. Sorry I totally missed it is using Gradle: I'm only having a bit of knowledge around Maven (and either manual or CD processes from the doc). Maybe there is something missing for Gradle use case, but I can't help on this.

=> You might want to raise the topic on the developer mailing list to get help from maintainers who, for sure, would have the knowledge on that "Gradle/Maven" tooling area (that could also help if documentation on jenkins.io should be written or updated).

To answer your questions, I'm not sure how is the initial release process of new plugin working to be honest. But usually for other plugin releases, there is a regular (private) process which runs every 15 min to detect last plugin updates and update the update center's index + proceed to make the plugin binary available through the Jenkins mirror (so it would be available for download). Let's wait 1-2 hours in order to all processes to run and see if your initial release is picked up: otherwise we'll check what is missing.

lemeurherve commented 1 year ago

Additionally, count around 3 to 4 hours for the new plugin release to appear on plugins.jenkins.io

dduportal commented 1 year ago
Capture d’écran 2022-12-06 à 12 44 05
dduportal commented 1 year ago

Plugin site build manually triggered: the plugin is visible in https://plugins.jenkins.io/zdevops/.

Congratulations for the release, and thanks for the contribution!

I'm closing the issue, as it seem solved. Please do not hesitate to reopen if you need more details or still have an issue!

IBA-mainframe-dev commented 1 year ago

@dduportal @lemeurherve @NotMyFault , thank you so much for your help and advices! I'll wait for the allotted time to check if everything turned out as planned (since the description from the README.md file has not yet been pulled up on the plugin page, I hope the plugin page will be displayed correctly after all the processes). And once again, thanks a lot to all of you!

dduportal commented 1 year ago

Hello @halkeye, could you help on this area? This (new) plugin is using Gradle, which mean no pom.xml.

It sounds like it does not use README.md file because of that.

cc @gounthar @MarkEWaite @kmartens27 for documentation

halkeye commented 1 year ago

as far as I know the gradle plugins don't produce all the correct metadata for plugin site, it'll work, but no readme and stuff. Update center pulls the pom.xml from inside the plugin.

If possible i'd suggest switching from gradle to maven to have a better experience, complete with code scanning and stuff.

basil commented 1 year ago

+1 If you are using Gradle to do Jenkins plugin development, you are on your own. See https://github.com/jenkinsci/ivy-plugin/pull/49 for an example of how to switch to the supported Maven toolchain.

NotMyFault commented 1 year ago

+1 If you are using Gradle to do Jenkins plugin development, you are on your own. See jenkinsci/ivy-plugin#49 for an example of how to switch to the supported Maven toolchain.

Maybe we should officially deprecate the gradle toolchain for new plugins, given it doesn't support major infra components and its plugin authors have made no attempt in years to support it 🤔

dduportal commented 1 year ago

@IBA-mainframe-dev I'm closing the issue as we got answers on "why there are no README" content in plugins.jenkins.io. You'll have to switch to Maven to benefit from this (or contribute to the Gradle toolchain which seems quite a hard direction).

Feel free to re-open if you feel like there are still issues!