Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

v0.2.0: Now supporting bindings in the `jenkinsJobDsl` section

Compare
Choose a tag to compare
@pvdissel pvdissel released this 18 Mar 21:13
· 8 commits to master since this release

You can now configure binding variables
in the jenkinsJobDsl section to mimic bindings on an
action Seed job in Jenkins.

With this, in your build.gradle file, you can configure the bindings:

jenkinsJobDsl {
    jobConfigs {
        from file('project.dsl.groovy')
    }
    binding = ['NAME': project.name]
}

and use them in your DSL script files, like:

job {
    name "${NAME}"
    description 'Single job example'
}

Where the NAME binding could be for example a
job parameter to your Seed job in Jenkins.

Thanks to @dlethin for contributing.

From now on, I will use Semantic Versioning