title: How to configure basic branch build strategies plugin using job dsl?
body: <p>The multi branch pipeline plugin, awesome as it is, doesn't build tags out of the box. The usage of the basic-branch-build-strategies-plugin is required to enable tag discovery and building. </p>
  
  <p>My question is directly related to: <a href="https://stackoverflow.com/questions/47146616/is-there-a-way-to-automatically-build-tags-using-the-multibranch-pipeline-jenkins">Is there a way to automatically build tags using the Multibranch Pipeline Jenkins plugin?</a></p>
  
  <p>This plugin works great in the UI but doesn't appear to be easily configurable using the Jenkins job dsl. Does anyone have any examples of how to set the branch strategies using the dsl (or dsl configure->) so that tags will be discovered and built?</p>
  
  <p>Having examined the delta between the config.xml files when the settings are changed via ui, it looks like I need to be able to add this trait: </p>
  
  <pre><code>&lt;org.jenkinsci.plugins.github__branch__source.TagDiscoveryTrait /&gt;
  </code></pre>
  
  <p>and this section under build strategies:</p>
  
  <pre><code>&lt;buildStrategies
      &lt;jenkins.branch.buildstrategies.basic.TagBuildStrategyImpl
          plugin="basic-branch-build-strategies@1.1.1"&gt;
          &lt;atLeastMillis&gt;-1&lt;/atLeastMillis&gt;
          &lt;atMostMillis&gt;172800000&lt;/atMostMillis&gt;
      &lt;/jenkins.branch.buildstrategies.basic.TagBuildStrategyImpl&gt;
  &lt;/buildStrategies&gt;
  </code></pre>