job

list items

get name and classes

  • result

list all jobs and folders

  • result:

list all WorkflowJob

Abstract Project: freestyle, maven, etc...

list all folders

list all disabled projects/jobs

  • or

  • or

list inactive jobs

[!NOTE] List jobs haven't been built in 6 months

[!NOTE|label:references:]

list all cron jobs

disable timer trigger in freestyle only

  • or

  • example 2:

get pipeline definitions

[!TIP|label:references:]

get pipeline scm definition

[!TIP]

get pipeline scriptPath

[!TIP]

get typical scm

[!NOTE]

get pipeline scm branch

get all SCMs

[!NOTE]

  • get all SCM definitions via getSCMs, including

    • Libraries

    • last builds, including all stages calls GitSCM

  • getSCMs

    • getLastSuccessfulBuild ?: getLastCompletedBuild ?: definedSCMs

  • or without lastBuild

  • or

check pipeline isn't get from particular branch

[!TIP]

get pipeline bare script

[!TIP]

get particular job status

list properties

[!NOTE] Java Code Examples for jenkins.model.Jenkins#getItemByFullName()

get logRotator

show logRotator via pattern

set logrotator

[!NOTE|label:references:]

update pipeline definition

[!NOTE]

update SCM definition

[!NOTE]

without output

with output

disable all particular projects jobs

undo disable jobs in particular projects

Last updated

Was this helpful?