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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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"

            Assignee:
            Unassigned
            Reporter:
            Marcel 'childNo͡.de' Trautwein
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: