workflow-plugin shallow clone

88 views
Skip to first unread message

Arek Skalski

unread,
Dec 2, 2014, 7:05:26 AM12/2/14
to jenkin...@googlegroups.com
I have a piece of groovy code generated by snipped:

checkout changelog: true, poll: true, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [<object of type hudson.plugins.git.extensions.impl.CloneOption>], submoduleCfg: [], userRemoteConfigs: [[url: '/home/jenkins/gitrepo/git/jenkins-bare']]]

But it does not work with following error:
startup failed:
script14175216551441637635534.groovy: 1: unexpected token: [ @ line 1, column 149.
   gurations: false, extensions: [<object o

Jesse Glick

unread,
Dec 2, 2014, 9:54:31 AM12/2/14
to Jenkins Dev
On Tue, Dec 2, 2014 at 7:05 AM, Arek Skalski <askal...@gmail.com> wrote:
> extensions: [<object of type hudson.plugins.git.extensions.impl.CloneOption>]

You have to replace the array element with actual code, such as a call
to the constructor of CloneOption, or more simply the map syntax:

[$class: 'CloneOption', shallow: true/false, reference: 'something',
timeout: 999]

I am not sure offhand why the snippet generator is not handling this
object and producing an error instead. Please file a bug in the
workflow-plugin component and specify the versions of Workflow and the
Git plugin you are using, and the configuration of the clone option
you were trying to generate.

Arek Skalski

unread,
Dec 10, 2014, 10:37:44 AM12/10/14
to jenkin...@googlegroups.com
Where exactly I can "file a bug"? Maybe a silly question, but actually I don't know where I can do it :-)

Daniel Beck

unread,
Dec 10, 2014, 11:12:13 AM12/10/14
to jenkin...@googlegroups.com
You go to jenkins-ci.org, click 'Bug Tracker' in the menu, and read the instructions.
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/d0ecb526-c489-44c4-898e-2a536cf53a44%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages