Skip to content

Latest commit

 

History

History
117 lines (93 loc) · 3.21 KB

common.md

File metadata and controls

117 lines (93 loc) · 3.21 KB

Common Config

defaultBranch

Default branch. Triggers will be run against this branch.

common:
  defaultBranch: master

prUseTargetBranch

If your git solution supports PR Branches, then you can set this to true if you would like to build PRs but retain the actual git branch name. This will ensure that build and deployment logic based on branch name events function correctly within Dockhand. If you are using commit/PR-* events then leave this setting set to false

  prUseTargetBranch: false

eventRegistryKeys

Events that match event or eventRegex will be pushed to to the registry at registryKey.

common:
  eventRegistryKeys:
    - event: commit/master
      registryKey: default
    - eventRegex: tag/(.*)
      registryKey: default

gitAlternateKey

Alternate Git configuration to select from Global Config git.gitAlternateMap

common:
  gitAlternateKey: gitlab

images

images are used in the following way:

  • Build Pipeline: will be pushed to matching registries
  • Promote Pipeline: will be promoted
  • Deploy Pipeline: image tags will be computed
common:
  images:
    - test/a
    - test/b

notify

Notification settings. Keys are references to targets defined in targetMap or the global notifyTargetMap. Supported notification target types are:

  • com.boxboat.jenkins.library.notify.SlackWebHookNotifyTarget
    • For use with the Slack Incoming Webhooks App
    • Jenkins Credential referenced in credential is a Secret Text credential with the full webhook URL
  • com.boxboat.jenkins.library.notify.SlackJenkinsAppNotifyTarget
  • com.boxboat.jenkins.library.notify.GoogleChatWebHookNotifyTarget
    • For use with Google Chat Webhooks
    • Jenkins Credential referenced in credential is a Secret Text credential with the full webhook URL
common:
  notify:
    targetMap:
      jenkins: !!com.boxboat.jenkins.library.notify.SlackJenkinsAppNotifyTarget
        channel: "#jenkins"
    successKeys:
      - default
      - jenkins
    successTargets:
      - !!com.boxboat.jenkins.library.notify.SlackJenkinsAppNotifyTarget
        channel: "#jenkins-success"
    failureKeys:
      - default
      - jenkins
    failureTargets:
      - !!com.boxboat.jenkins.library.notify.SlackJenkinsAppNotifyTarget
        channel: "#jenkins-failure"
    infoKeys:
      - default
      - jenkins
    infoTargets:
      - !!com.boxboat.jenkins.library.notify.SlackJenkinsAppNotifyTarget
        channel: "#jenkins-info"

userConfigMap

Users can define their own arbitrary configuration for use with their own library functions. The below example requires that a class called ArbitraryConfig exists which can accept foo and bar. See the extending documentation for a sample class.

common:
  userConfigMap:
    example: !!com.example.jenkins.library.config.ArbitraryConfig
      foo: biz
      bar: baz

vaultKey

Vault key to use

common:
  vaultKey: default