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

Unable to create pipeline job from a template with "using" keyword

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • job-dsl-plugin
    • CloudBees Jenkins Enterprise 2.46.3.2-rolling
      Latest job-dsl version (1.64)

      I have the following dsl:

      pipelineJob("hello-pipeline") {

           using("/templates/hello") // where hello is a pipeline job
      }

      Got this exception:

      java.lang.NullPointerExceptionat javaposse.jobdsl.plugin.ExecuteDslScripts.updateTemplates(ExecuteDslScripts.java:380)at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:322)

      Looking at the source, this line seems to be the culprit:

      AbstractProject templateProject = getLookupStrategy().getItem(seedJob, templateName, AbstractProject.class);

        

          [JENKINS-45812] Unable to create pipeline job from a template with "using" keyword

          Cuong Tran created issue -
          Cuong Tran made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Daniel Spilker made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            daspilker Daniel Spilker
            ctran Cuong Tran
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: