Skip to content

jenkins-pipeline plugin

TODO(dtm): Add your document here.

Usage

YAML
tools:
# name of the tool
- name: jenkins-pipeline
  # 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:
    jenkins:
      # url is used to config jenkins url
      url: http://jenkins.example.com:8080
      # jenkins' user name
      user: admin
      # jenkins namespace in k8s cluster
      namespace: jenkins
      # restart jenkins if true for plugin install
      enableRestart: true
    scm:
      # cloneURL is the project repo location, this can be http address or git address
      cloneURL: git@gitlab.com/root/test-project.git
      # apiURL is the api address of gitlab, if you use github, this field can be empty
      apiURL: http://gitlab.com
      # project branch, master as default
      branch: master
    pipeline:
      # jobName is jenkins's job name; <jobFolder/jobName> or <jobName>; e.g. jobs/test-job, test-job, jobs2/test-job
      jobName: test-job
      # jenkinsfilePath is the location describe how to get Jenkinsfile, it can be remote or local
      jenkinsfilePath: https://raw.githubusercontent.com/dtm-jenkins-pipeline-example/main/springboot/Jenkinsfile
      imageRepo:
        # image repo URL for pulling/pushing
        url: http://harbor.example.com:80
        # image repo user name
        user: admin