Skip to content

Governance Tiers

Governance Tiers allow users to configure hierarchies of Pipeline Configurations and Library Sources.

Adding Governance Tiers to the Jenkins User Interface

Governance Tiers can be configured globally in Manage Jenkins > Configure System and as a Folder property.

The below class structure shows how JTE adds a Governance Tier to these locations.

flowchart 
  GovernanceTier-->|encapsulated by|TemplateGlobalConfig
  TemplateGlobalConfig-->|contributes to|GlobalConfiguration
  GovernanceTier-->|ecncapsulated by|TemplateConfigFolderProperty
  TemplateConfigFolderProperty-->|contributes to|Folder
  Folder-->|inherits|OrganizationFolder
  Folder-->|inherits|MultiBranchProject

Implementing Configuration Sources

Governance Tiers define two Extension Points.

Extension Point Description
PipelineConfigurationProvider defines an interface for fetching Pipeline Configurations and Pipeline Templates
LibraryProvider defines an interface for fetching libraries from a Library Source

Note

Jenkins makes heavy use of ExtensionPoint to allow plugin classes to register themselves and augment functionality.

classDiagram
  class GovernanceTier{
    PipelineConfigurationProvider configurationProvider
    List~LibrarySource~ librarySources
    getHierarchy()$ List~GovernanceTier~
    +getLibrarySources() List~LibrarySource~
    +getConfig() PipelineConfigurationObject
    +getJenkinsfile() String
    +getTemplate(String template) String
  }
  class PipelineConfigurationProvider{
    <<abstract>>
    +PipelineConfigurationObject getConfig()
    +String getJenkinsfile()
    +String getTemplate()
  }
  GovernanceTier <.. PipelineConfigurationProvider
  class LibrarySource{
    -LibraryProvider libraryProvider
    +getLibraryProvider() LibraryProvider
  }
  class LibraryProvider{
    <<abstract>>
    +hasLibrary(String libName) boolean
    +getLibrarySchema(String libName) String
    +loadLibrary(String libName)
  }
  LibrarySource <.. LibraryProvider
  GovernanceTier <.. LibrarySource

Existing Extensions

PipelineConfigurationProvider

Concrete Extension Description
NullPipelineConfigurationProvider the no-op default. provides no configuration.
ConsolePipelineConfigurationProvider define configuration in the Jenkins UI
SCMPipelineConfigurationProvider define configuration in a remote repository

LibraryProvider

Concrete Extension Description
ScmLibraryProvider fetch libraries from a remote repository
PluginLibraryProvider fetch libraries from a Jenkins plugin
Back to top