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

Legacy pipeline library definition not supported by JCasC

XMLWordPrintable

    • configuration as code plugin 1.22 and later

      Based on the legacy SCM global pipeline library in my lts-with-plugins docker image, when I download the configuration as code suggested definition for my Jenkins server, it reports that the globalLibraries legacySCM section fails to export. The output is:

      jenkins:
        globalLibraries:
          libraries:
          - defaultVersion: "master"
            name: "globalPipelineLibraryMarkEWaite"
            retriever:
              legacySCM:
                scm: "FAILED TO EXPORT org.jenkinsci.plugins.workflow.libs.SCMRetriever#scm:\
                  \ java.lang.ClassCastException: java.util.Collections$UnmodifiableRandomAccessList\
                  \ cannot be cast to hudson.plugins.git.UserRemoteConfig  at hudson.plugins.git.GitSCM.updateFromUserData(GitSCM.java:255)\
                  \  at hudson.plugins.git.GitSCM.<init>(GitSCM.java:209)\nCaused: java.lang.reflect.InvocationTargetException\
                  \  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\
                  \  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\
                  \  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\
                  \  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)\
                  \  at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:256)\
                  \  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:233)\
                  \  at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:201)\
                  \  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:233)\
                  \  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:103)\
                  \  at io.vavr.control.Option.map(Option.java:373)  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:103)\
                  \  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:51)\
                  \  at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:198) \
                  \ at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:265)\
                  \  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:233)\
                  \  at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:201)\
                  \  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:233)\
                  \  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:103)\
                  \  at io.vavr.control.Option.map(Option.java:373)  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:103)\
                  \  at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:51)\
                  \  at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:198) \
                  \ at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:265)\
                  \  at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:194) \
                  \ at io.jenkins.plugins.casc.Configurator.describe(Configurator.java:162)\
                  \  at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:106)\
                  \  at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.lambda$describe$3(GlobalConfigurationCategoryConfigurator.java:99)\
                  \  at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)\
                  \  at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)\
                  \  at java.util.Iterator.forEachRemaining(Iterator.java:116)  at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)\
                  \  at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)\
                  \  at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)\
                  \  at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)\
                  \  at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)\
                  \  at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\
                  \  at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)\
                  \  at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:99)\
                  \  at io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator.describe(GlobalConfigurationCategoryConfigurator.java:30)"
      

            Unassigned Unassigned
            markewaite Mark Waite
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: