Jenkins

by appleboy

The example Yaml configurations in this file are using the legacy 0.8 syntax. If you are using Drone 1.0 or Drone Cloud please ensure you use the appropriate 1.0 syntax. Learn more here.

The Jenkins plugin allows you to trigger Jenkins job automatically. The below pipeline configuration demonstrates simple usage:

pipeline:
  jenkins:
    image: appleboy/drone-jenkins
    url: http://example.com
    user: appleboy
    token: xxxxxxxxxx
    job: drone-jenkins-plugin-job

Example configuration for success builds:

pipeline:
  jenkins:
    image: appleboy/drone-jenkins
    url: http://example.com
    user: appleboy
    token: xxxxxxxxxx
    job: drone-jenkins-plugin-job
+   when:
+     status: [ success ]

Example configuration with multiple jobs:

pipeline:
  jenkins:
    image: appleboy/drone-jenkins
    url: http://example.com
    user: appleboy
    token: xxxxxxxxxx
    job:
+     - drone-jenkins-plugin-job-1
+     - drone-jenkins-plugin-job-2

Example configuration with jobs in the folder:

pipeline:
  jenkins:
    image: appleboy/drone-jenkins
    url: http://example.com
    user: appleboy
    token: xxxxxxxxxx
+   job: folder_name/job_name

It will trigger the URL of Jenkins job like as http://example.com/job/folder_name/job/job_name/

Parameter Reference

url
jenkins server base url.
user
jenkins user account
token
jenkins user token
job
jenkins job name

这个网页有没有错误? 请让我们知道 或编辑 这个页面