Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65687

Artifactory plugin not working with JCasC

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • artifactory-plugin
    • None
    • Jenkins: 2.277.4 (LTS)
      artifactory plugin: 3.11.0 (upgrade from 3.10.6)
      configuration-as-code plugin: 1.51

       

      We are using Artifactory plugin with JCasC. Current config we used with version 3.10.6 of the plugin was

      artifactoryBuilder:
        artifactoryServers:
          - serverId: "company-artrepo"
            artifactoryUrl: "https://artrepo.mycompany.com/artifactory"
            bypassProxy: true
            deployerCredentialsConfig:
              credentialsId: "artrepo-user"
        useCredentialsPlugin: true

      Upgrading Artifactory plugin from 3.10.6 to 3.11.0 gives an error when using Configuration as Code. This is what I see when I try to export the JCasC yaml:

      unclassified:
        artifactoryBuilder:
          artifactoryServers: |-
            FAILED TO EXPORT
            org.jfrog.hudson.ArtifactoryBuilder$DescriptorImpl#artifactoryServers: No configurator found for type class org.jfrog.hudson.ArtifactoryServer
          jfrogInstances: |-
            FAILED TO EXPORT
            org.jfrog.hudson.ArtifactoryBuilder$DescriptorImpl#jfrogInstances: io.jenkins.plugins.casc.ConfiguratorException: Can't read attribute 'instanceId' from org.jfrog.hudson.JFrogPlatformInstance@228062b7
              at io.jenkins.plugins.casc.Attribute._getValue(Attribute.java:461)
              at io.jenkins.plugins.casc.Attribute.getValue(Attribute.java:235)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:289)
              at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
              at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:257)
              at io.jenkins.plugins.casc.Configurator.describe(Configurator.java:183)
              at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:115)
              at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.lambda$describe$3(GlobalConfigurationCategoryConfigurator.java:108)
              at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
              at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
              at java.util.Iterator.forEachRemaining(Unknown Source)
              at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
              at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
              at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
              at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
              at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
              at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
              at java.util.stream.ReferencePipeline.forEach(Unknown Source)
              at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:108)
              at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:33)
          jfrogPipelinesServer:
            bypassProxy: false
            connectionRetries: 3
            credentialsConfig:
              ignoreCredentialPluginDisabled: true
              overridingCredentials: false
              password: "xxx"
              username: "****"
            timeout: 300
          useCredentialsPlugin: true

       

      See full stacktraces from jenkins controller logs in attached file `jenkins.log`.

       

            yossis yossis
            matfau Mats Faugli
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: