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

declarative-linter don't work with shared library

XMLWordPrintable

      I have a jenkinsfile which call shared library at the beginning

      @Library('gconftools')
      import forjenkins.GetNodes
      

      this jenkinsfile work correctly, but when I want to test with declarative-linter, there is an error.

      java -jar /var/lib/jenkins/home/war/WEB-INF/jenkins-cli.jar -s http://serveur.domainperso:8082 declarative-linter --username=user --password mdp <script.groovy
      
      Errors encountered validating Jenkinsfile:
      WorkflowScript: 7: unable to resolve class forjenkins.GetNodes
       @ line 7, column 1.
         @Library('gconftools')
         ^
      
      WorkflowScript: 26: unable to resolve class forjenkins.GetNodes 
       @ line 26, column 7.
                      z = new forjenkins.GetNodes()
               ^
      

            Unassigned Unassigned
            bdouxx Boudoux Etienne
            Votes:
            15 Vote for this issue
            Watchers:
            25 Start watching this issue

              Created:
              Updated: