Marquis Blount
Marquis Blount

Reputation: 8095

Difference between Jenkins Job and FreestyleJob

Using Jenkins DSL plugin I've come across Job and freeStyleJob. Is there any difference between the two looking at the sparse documentation they look like they are the exact same thing. Do they both exist for historical reasons or is there actually a difference between the two?

Upvotes: 2

Views: 1397

Answers (1)

Toni Van de Voorde
Toni Van de Voorde

Reputation: 949

They are exactly the same thing. The method Job() was introduced since version 1.30 of the job-dsl-plugin and acts as an alias for freeStyleJob().

At the moment of this writing you have following methods:

job(String name, Closure closure = null)          // since 1.30, an alias for freeStyleJob

freeStyleJob(String name, Closure closure = null) // since 1.30

buildFlowJob(String name, Closure closure = null) // since 1.30

ivyJob(String name, Closure closure = null)       // since 1.38

matrixJob(String name, Closure closure = null)    // since 1.30

mavenJob(String name, Closure closure = null)     // since 1.30

multiJob(String name, Closure closure = null)     // since 1.30

workflowJob(String name, Closure closure = null)  // since 1.30

multibranchWorkflowJob(String name, Closure closure = null) // since 1.42

https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands#job

Upvotes: 1

Related Questions