Skip to content

jenkins Plugin

This plugin installs Jenkins in an existing Kubernetes cluster using the Helm chart.

It also installs GitHub Pull Request Builder(ghprb) and OWASP Markup Formatter plugins. Then enable HTML parsing using OWASP Markup Formatter Plugin , useful with ghprb plugin.

Config

Please be sure to change the storageClass in the options of the config to an existing StorageClass.

YAML
tools:
# name of the tool
- name: jenkins
  # id of the tool instance
  instanceID: default
  # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool.
  dependsOn: [ ]
  # options for the plugin
  options:
    # Helm repo information
    repo:
      # name of the Helm repo
      name: jenkins
      # url of the Helm repo
      url: https://charts.jenkins.io
    # Helm chart information
    chart:
      # local path of the chart; if chartPath != "", repo.name and repo.url will be ignored. e.g. "foo.tgz", "./foo.tgz", "/tmp/foo.tgz"
      chartPath: ""
      # name of the chart
      chartName: jenkins/jenkins
      # k8s namespace where jenkins will be installed
      namespace: jenkins
      # whether to wait for the release to be deployed or not
      wait: true
      # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s
      timeout: 5m
      # whether to perform a CRD upgrade during installation
      upgradeCRDs: true
      # custom configuration. You can refer to [Jenkins values.yaml](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml)
      valuesYaml: |
        persistence:
          storageClass: ""
        serviceAccount:
          create: true
          name: jenkins
        controller:
          adminUser: "admin"
          adminPassword: "changeme"
          serviceType: NodePort
          nodePort: 32000

Default Configs

key default value description
chart.chartPath "" local chart path
chart.chartName jenkins/jenkins chart name
chart.timeout 5m this config will wait 5 minutes to deploy
chart.upgradeCRDs true default update CRD config
chart.releaseName jenkins helm release name
chart.wait true whether to wait until installation is complete
chart.namespace jenkins namespace where helm to deploy
repo.url https://charts.jenkins.io helm official repo address
repo.name jenkins helm repo name

Currently, expect default configs all the parameters in the example above are mandatory.

Outputs

This plugin has two outputs:

  • jenkinsURL (format: hostname:port, example: "localhost:8080")
  • jenkinsPasswordOfAdmin