Behaviours (tags / advanced clone options) for github multibranch

625 views
Skip to first unread message

sfoster

unread,
Oct 26, 2017, 12:04:41 PM10/26/17
to job-dsl-plugin
Is there a way to define behaviours (specifically Advanced Clone Behaviours, in order to restore fetching tags) for multibranch projects with a github branch source?

an...@heptio.com

unread,
Feb 5, 2018, 10:03:10 AM2/5/18
to job-dsl-plugin
I'm also interested in this. Is it on the roadmap? Thanks!

Victor Martinez

unread,
Feb 5, 2018, 11:25:25 AM2/5/18
to job-dsl-plugin
I guess you can use the configure closure:

multibranchPipelineJob(String name) {
  • ...
  • // Adds branch sources.
    branchSources { ... }
  • // Allows direct manipulation of the generated XML.
    configure(Closure configureBlock)
}


https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block and there are some examples of how others are using it: 

Cheers

Andy Goldstein

unread,
Feb 5, 2018, 11:33:38 AM2/5/18
to job-dsl...@googlegroups.com
Thanks, I'll take a look at those examples. But it seems like this would be a reasonable thing to add, since you can do it with

job('foo') {
  scm {
    git {
      // ...
      extensions {
        cloneOptions {
          noTags(false)
        }
      }
    }
  }
}

but it doesn't appear to be supported by the GitHub branch source in a multibranch pipeline job.

WDYT?


--
You received this message because you are subscribed to a topic in the Google Groups "job-dsl-plugin" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/job-dsl-plugin/LovyQin9PmA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to job-dsl-plugin+unsubscribe@googlegroups.com.
To post to this group, send email to job-dsl-plugin@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/5641ab3c-f647-4b19-9ac5-80c51cf2bd60%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages