zerotk.jenkins-job-builder-pipeline

Pipeline support for jenkins-job-builder


Keywords
jenkins-job-builder, pipeline-job
License
Apache-2.0
Install
pip install zerotk.jenkins-job-builder-pipeline==0.1.1

Documentation

jenkins-job-builder-pipeline

A plugin for jenkins-job-builder to support pipeline job generation.

Build Status: Build Status

Usage:

Plugin adds a new project-type pipeline and a job definition field pipeline. There are two distinct job definitions.

Create a pipeline job with a DSL script:

- job:
    name: example-script
    project-type: pipeline
    pipeline:
      script: |
        # Your dsl script goes here.
        node {
          echo 'Hello world'
        }
      sandbox: true # Use groovy sandbox, false by default.

Create a pipeline job loading pipeline script from SCM.

- job:
    name: example-scm-script
    project-type: pipeline
    pipeline:
      script-path: subdir/Jenkinsfile # path to pipeline script definition, "Jenkinsfile" by default.
      scm: # normal scm definitions
        - git:
            branches:
              - '*/maser'
            url: 'git@github.com:github-username/repository-name.git'
            basedir: 'subdir'
            skip-tag: true
            wipe-workspace: false

Definition type is chosen automatically by detecting presence of "scm" field.