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

Create a build job from pipeline - as like pipelineJob does for JenkinsDSL

      Actually I'm evaluating different possibilites to better restructure our complex CD/CI pipeline.

      One of the things I stumpled on was:

      I'm able to start a defined job by it's known name

      build job: 'knownJobname'

      but I'm unable to create the job itself, if it doesn't already exist from the multibranch-pipline Job: desired

      build job: 'knownJobname', from 'Jenkinsfile.job.knownJobname.groovy'

      which should

      1. checks for the given job
      2. updates or creates the job
        1. perhaps should auto-update the name for multipipeline builds
      3. run the build job with the given parameters

       

      actually it just fails if the job doesn't exist: https://github.com/jenkinsci/pipeline-build-step-plugin/blob/4512e19/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep.java#L100

       

      In JenkinsDSL there was a pipelineJob which solved this:
      https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob
       

      I'm quite unsure which of the "pluged in steps" is affected or should do/cover this.
      The nearest hit is indeed https://plugins.jenkins.io/pipeline-build-step itself, but perhaps there should be a another "plugin" for it, or bundled in any "-support" / "-api" or "-cps-" plugin?!

       

      P.S: should https://plugins.jenkins.io/workflow-job do the job?! I'm lost in documentations ;(
      ^ no, it's the Pipeline Job itself, not a step definition "plugin"

          [JENKINS-42711] Create a build job from pipeline - as like pipelineJob does for JenkinsDSL

          Marcel 'childNo͡.de' Trautwein created issue -
          Marcel 'childNo͡.de' Trautwein made changes -
          Epic Link New: JENKINS-35386 [ 171179 ]
          Marcel 'childNo͡.de' Trautwein made changes -
          Description Original: Actually I'm evaluating different possibilites to better restructure our complex CD/CI pipeline.

          One of the things I stumpled on was:

          I'm able to start a defined job by it's known name
          {code:java}
          build job: 'knownJobname'{code}
          but I'm unable to create the job itself, if it doesn't already exist from the multibranch-pipline Job: desired
          {code:java}
          build job: 'knownJobname', from 'Jenkinsfile.job.knownJobname.groovy'{code}
          which should
           # checks for the given job
           # updates or creates the job
           ## perhaps should auto-update the name for multipipeline builds
           # run the build job with the given parameters

           

          actually it just fails if the job doesn't exist: [https://github.com/jenkinsci/pipeline-build-step-plugin/blob/4512e19/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep.java#L100]

           

          In JenkinsDSL there was a {{pipelineJob}} which solved this:
           [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob]
            

          I'm quite unsure which of the ["pluged in steps"|https://jenkins.io/doc/pipeline/steps/] is affected or should do/cover this.
           The nearest hit is indeed [https://plugins.jenkins.io/pipeline-build-step] itself, but perhaps there should be a another "plugin" for it, or bundled in any "-support" / "-api" or "-cps-" plugin?!
          New: Actually I'm evaluating different possibilites to better restructure our complex CD/CI pipeline.

          One of the things I stumpled on was:

          I'm able to start a defined job by it's known name
          {code:java}
          build job: 'knownJobname'{code}
          but I'm unable to create the job itself, if it doesn't already exist from the multibranch-pipline Job: desired
          {code:java}
          build job: 'knownJobname', from 'Jenkinsfile.job.knownJobname.groovy'{code}
          which should
           # checks for the given job
           # updates or creates the job
           ## perhaps should auto-update the name for multipipeline builds
           # run the build job with the given parameters

           

          actually it just fails if the job doesn't exist: [https://github.com/jenkinsci/pipeline-build-step-plugin/blob/4512e19/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep.java#L100]

           

          In JenkinsDSL there was a {{pipelineJob}} which solved this:
           [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob]
            

          I'm quite unsure which of the ["pluged in steps"|https://jenkins.io/doc/pipeline/steps/] is affected or should do/cover this.
           The nearest hit is indeed [https://plugins.jenkins.io/pipeline-build-step] itself, but perhaps there should be a another "plugin" for it, or bundled in any "\-support" / "\-api" or "\-cps-" plugin?!
          Marcel 'childNo͡.de' Trautwein made changes -
          Description Original: Actually I'm evaluating different possibilites to better restructure our complex CD/CI pipeline.

          One of the things I stumpled on was:

          I'm able to start a defined job by it's known name
          {code:java}
          build job: 'knownJobname'{code}
          but I'm unable to create the job itself, if it doesn't already exist from the multibranch-pipline Job: desired
          {code:java}
          build job: 'knownJobname', from 'Jenkinsfile.job.knownJobname.groovy'{code}
          which should
           # checks for the given job
           # updates or creates the job
           ## perhaps should auto-update the name for multipipeline builds
           # run the build job with the given parameters

           

          actually it just fails if the job doesn't exist: [https://github.com/jenkinsci/pipeline-build-step-plugin/blob/4512e19/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep.java#L100]

           

          In JenkinsDSL there was a {{pipelineJob}} which solved this:
           [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob]
            

          I'm quite unsure which of the ["pluged in steps"|https://jenkins.io/doc/pipeline/steps/] is affected or should do/cover this.
           The nearest hit is indeed [https://plugins.jenkins.io/pipeline-build-step] itself, but perhaps there should be a another "plugin" for it, or bundled in any "\-support" / "\-api" or "\-cps-" plugin?!
          New: Actually I'm evaluating different possibilites to better restructure our complex CD/CI pipeline.

          One of the things I stumpled on was:

          I'm able to start a defined job by it's known name
          {code:java}
          build job: 'knownJobname'{code}
          but I'm unable to create the job itself, if it doesn't already exist from the multibranch-pipline Job: desired
          {code:java}
          build job: 'knownJobname', from 'Jenkinsfile.job.knownJobname.groovy'{code}
          which should
           # checks for the given job
           # updates or creates the job
           ## perhaps should auto-update the name for multipipeline builds
           # run the build job with the given parameters

           

          actually it just fails if the job doesn't exist: [https://github.com/jenkinsci/pipeline-build-step-plugin/blob/4512e19/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep.java#L100]

           

          In JenkinsDSL there was a {{pipelineJob}} which solved this:
           [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob]
            

          I'm quite unsure which of the ["pluged in steps"|https://jenkins.io/doc/pipeline/steps/] is affected or should do/cover this.
           The nearest hit is indeed [https://plugins.jenkins.io/pipeline-build-step] itself, but perhaps there should be a another "plugin" for it, or bundled in any "-support" / "-api" or "-cps-" plugin?!

           

          P.S: should [https://plugins.jenkins.io/workflow-job] do the job?! I'm lost in documentations ;(
          Marcel 'childNo͡.de' Trautwein made changes -
          Description Original: Actually I'm evaluating different possibilites to better restructure our complex CD/CI pipeline.

          One of the things I stumpled on was:

          I'm able to start a defined job by it's known name
          {code:java}
          build job: 'knownJobname'{code}
          but I'm unable to create the job itself, if it doesn't already exist from the multibranch-pipline Job: desired
          {code:java}
          build job: 'knownJobname', from 'Jenkinsfile.job.knownJobname.groovy'{code}
          which should
           # checks for the given job
           # updates or creates the job
           ## perhaps should auto-update the name for multipipeline builds
           # run the build job with the given parameters

           

          actually it just fails if the job doesn't exist: [https://github.com/jenkinsci/pipeline-build-step-plugin/blob/4512e19/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep.java#L100]

           

          In JenkinsDSL there was a {{pipelineJob}} which solved this:
           [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob]
            

          I'm quite unsure which of the ["pluged in steps"|https://jenkins.io/doc/pipeline/steps/] is affected or should do/cover this.
           The nearest hit is indeed [https://plugins.jenkins.io/pipeline-build-step] itself, but perhaps there should be a another "plugin" for it, or bundled in any "-support" / "-api" or "-cps-" plugin?!

           

          P.S: should [https://plugins.jenkins.io/workflow-job] do the job?! I'm lost in documentations ;(
          New: Actually I'm evaluating different possibilites to better restructure our complex CD/CI pipeline.

          One of the things I stumpled on was:

          I'm able to start a defined job by it's known name
          {code:java}
          build job: 'knownJobname'{code}
          but I'm unable to create the job itself, if it doesn't already exist from the multibranch-pipline Job: desired
          {code:java}
          build job: 'knownJobname', from 'Jenkinsfile.job.knownJobname.groovy'{code}
          which should
           # checks for the given job
           # updates or creates the job
           ## perhaps should auto-update the name for multipipeline builds
           # run the build job with the given parameters

           

          actually it just fails if the job doesn't exist: [https://github.com/jenkinsci/pipeline-build-step-plugin/blob/4512e19/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStep.java#L100]

           

          In JenkinsDSL there was a {{pipelineJob}} which solved this:
           [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob]
            

          I'm quite unsure which of the ["pluged in steps"|https://jenkins.io/doc/pipeline/steps/] is affected or should do/cover this.
           The nearest hit is indeed [https://plugins.jenkins.io/pipeline-build-step] itself, but perhaps there should be a another "plugin" for it, or bundled in any "\-support" / "\-api" or "\-cps-" plugin?!

           

          -P.S: should [https://plugins.jenkins.io/workflow-job] do the job?! I'm lost in documentations ;(-
          ^ no, it's the Pipeline Job itself, not a step definition "plugin"
          Jesse Glick made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            childnode Marcel 'childNo͡.de' Trautwein
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: