Class RealJenkinsRule.SyntheticPlugin

java.lang.Object
org.jvnet.hudson.test.RealJenkinsRule.SyntheticPlugin
Enclosing class:
RealJenkinsRule

public final class RealJenkinsRule.SyntheticPlugin extends Object
Alternative to RealJenkinsRule.addPlugins(java.lang.String...) or TestExtension that lets you build a test-only plugin on the fly. (ExtensionList.add(Object) can also be used for certain cases, but not if you need to define new types.)
  • Method Details

    • shortName

      public RealJenkinsRule.SyntheticPlugin shortName(String shortName)
      Plugin identifier (Short-Name manifest header). Defaults to being calculated from the package name, replacing . with - and prefixed by synthetic-.
    • version

      public RealJenkinsRule.SyntheticPlugin version(String version)
      Plugin version string (Plugin-Version manifest header). Defaults to an arbitrary snapshot version.
    • header

      public RealJenkinsRule.SyntheticPlugin header(String key, String value)
      Add an extra plugin manifest header. Examples:
      • Jenkins-Version: 2.387.3
      • Plugin-Dependencies: structs:325.vcb_307d2a_2782,support-core:1356.vd0f980edfa_46;resolution:=optional
      • Long-Name: My Plugin
    • done

      public RealJenkinsRule done()
      Returns:
      back to the rule builder