Jenkins DSL Script lightweight() checkout not working

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

XMLWordPrintable

    So, here is my pipelineJob() Jenkins DSL Script that I am using to create Jobs in Jenkins, but when I use lightweight() in cpsScmFlowDefinition, this script doesn't work and gives me an error which I have pasted below.

    Jenkins version 2.73.2 and DSL plugin version 1.66. Please help me to fix this issue. Thanks.

     

    pipelineJob('') {
     label('')
     definition {
      cpsScmFlowDefinition {
       scm {
        git {
         remote {
          url('')
          credentials('')
         }
         branch('')
         extensions {
          cleanBeforeCheckout()
          localBranch()
         }
        }
       }
       scriptPath('')
       lightweight(true) // error while using this
      }
     }
    }

     

    ERROR:

     

    Processing provided DSL script
    ERROR: (script, line 14) No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.git() is applicable for argument types: (script$_run_closure1$_closure4$_closure7$_closure8$_closure9) values: [script$_run_closure1$_closure4$_closure7$_closure8$_closure9@516b358d]
    Possible solutions: wait(), wait(long), with(groovy.lang.Closure), is(java.lang.Object), grep(), find()
    [BFA] Scanning build for known causes...
    [BFA] No failure causes found
    [BFA] Done. 0s
    Collecting metadata...
    Metadata collection done.
    Started calculate disk usage of build
    Finished Calculation of disk usage of build in 0 seconds
    Started calculate disk usage of workspace
    Finished Calculation of disk usage of workspace in 0 seconds
    Finished: FAILURE

     

          Assignee:
          Daniel Spilker
          Reporter:
          Summit Singh Thakur
          Archiver:
          Jenkins Service Account

            Created:
            Updated:
            Resolved:
            Archived: