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

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

    Details

    • Similar Issues:

      Description

      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);

        

        Attachments

          Activity

          Hide
          ctran Cuong Tran added a comment -

          Should I take a stab at fixing this problem?

          Show
          ctran Cuong Tran added a comment - Should I take a stab at fixing this problem?
          Hide
          daspilker Daniel Spilker added a comment -

          Cuong Tran thanks for the offer, I addressed this myself. It's going to be fixed in the next release.

          https://github.com/jenkinsci/job-dsl-plugin/pull/1052

          Show
          daspilker Daniel Spilker added a comment - Cuong Tran thanks for the offer, I addressed this myself. It's going to be fixed in the next release. https://github.com/jenkinsci/job-dsl-plugin/pull/1052
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/ExecuteDslScripts.java
          http://jenkins-ci.org/commit/job-dsl-plugin/ccf0dadcbe836e82a33c02ab1f3e3b44e0e6fb9e
          Log:
          fixed problem with using in Pipeline jobs

          [FIXES JENKINS-45812]

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/ExecuteDslScripts.java http://jenkins-ci.org/commit/job-dsl-plugin/ccf0dadcbe836e82a33c02ab1f3e3b44e0e6fb9e Log: fixed problem with using in Pipeline jobs [FIXES JENKINS-45812]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/ExecuteDslScripts.java
          http://jenkins-ci.org/commit/job-dsl-plugin/f1b120337eea24f08edfefbc002e39ccb7574406
          Log:
          Merge pull request #1052 from daspilker/JENKINS-45812

          JENKINS-45812 fixed problem with using in Pipeline jobs

          Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/b60e59e736c7...f1b120337eea

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/ExecuteDslScripts.java http://jenkins-ci.org/commit/job-dsl-plugin/f1b120337eea24f08edfefbc002e39ccb7574406 Log: Merge pull request #1052 from daspilker/ JENKINS-45812 JENKINS-45812 fixed problem with using in Pipeline jobs Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/b60e59e736c7...f1b120337eea

            People

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

              Dates

              • Created:
                Updated:
                Resolved: