jfrog / jenkins-jfrog-plugin

Easy integration between Jenkins and the JFrog Platform.
https://github.com/jfrog/jenkins-jfrog-plugin
Apache License 2.0
39 stars 17 forks source link

Fix after serverId was renamed in PR #36 #55

Closed harbulot closed 1 year ago

harbulot commented 1 year ago

A recent change (PR #36, commit 41161458b313f45c2f5b3eab0df16c1456646830) renamed id into serverId in the ArtifactoryInstaller .

The <select name="id"> entry in the jelly file wasn't renamed accordingly, preventing this field from being saved when the configuration is saved.

This results in this exception when trying to use the Artifactory installer:

java.io.IOException: Server id 'null' doesn't exists.
    at io.jenkins.plugins.jfrog.ArtifactoryInstaller.performInstallation(ArtifactoryInstaller.java:64)
    at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:70)
    at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
    at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:221)
    at io.jenkins.plugins.jfrog.JfrogInstallation.forNode(JfrogInstallation.java:50)
    at io.jenkins.plugins.jfrog.JfrogInstallation.forNode(JfrogInstallation.java:32)

Configuration before this patch:

    <io.jenkins.plugins.jfrog.JfrogInstallation>
      <name></name>
      <home></home>
      <properties>
        <hudson.tools.InstallSourceProperty>
          <installers>
            <io.jenkins.plugins.jfrog.ArtifactoryInstaller>
              <repository>jfrog-cli-remote</repository>
              <version></version>
            </io.jenkins.plugins.jfrog.ArtifactoryInstaller>
          </installers>
        </hudson.tools.InstallSourceProperty>
      </properties>
    </io.jenkins.plugins.jfrog.JfrogInstallation>

Configuration after this patch:

    <io.jenkins.plugins.jfrog.JfrogInstallation>
      <name></name>
      <home></home>
      <properties>
        <hudson.tools.InstallSourceProperty>
          <installers>
            <io.jenkins.plugins.jfrog.ArtifactoryInstaller>
              <serverId>repo</serverId>
              <repository>jfrog-cli-remote</repository>
              <version></version>
            </io.jenkins.plugins.jfrog.ArtifactoryInstaller>
          </installers>
        </hudson.tools.InstallSourceProperty>
      </properties>
    </io.jenkins.plugins.jfrog.JfrogInstallation>
github-actions[bot] commented 1 year ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

harbulot commented 1 year ago

I have read the CLA Document and I hereby sign the CLA

github-actions[bot] commented 1 year ago

What is Frogbot?