Skip to content

strangelookingnerd/pipeline-restful-api-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipeline restFul API

API

This plugin provides some APIs to access the Pipeline Job.

Get Pipeline

curl http://localhost/jenkins/job/test/restFul/

Update Pipeline

curl http://localhost/jenkins/job/test/restFul/update -X POST

Build Pipeline

curl http://localhost/jenkins/job/test/restFul/build?delay=0&timeout=10 -X POST

Sample response:

{
	"_class": "io.jenkins.plugins.pipeline.restful.api.PipelineRestfulAPI$IdentityBuild",
	"build": {
		"number": 6,
		"url": "http://localhost:8080/jenkins/job/test/6/"
	},
	"cause": {
		"shortDescription": "Identity cause, message is null, uuid is 809b77d4-5a26-4743-b08f-7e801d6fb03b"
	}
}

Parameters

Add parameters: curl http://localhost:8080/jenkins/job/test/restFul/addParameter --data 'params=[{"name":"name","value":"rick","desc":"this is a name"}]'

Remove parameters: curl -X POST "http://localhost:8080/jenkins/job/test/restFul/removeParameter?params=name,age"

About

Provide the API endpoint for Jenkins CLI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%