create_or_update_job_from_jenkinsfile
Automate Jenkins job creation or updates using a Jenkinsfile. Specify server, job name, and pipeline script content to streamline CI/CD workflows.
Instructions
Create or update a Jenkins job based on a Jenkinsfile.
Args:
server_name: Jenkins server name
job_name: Name for the job (create if not exists, update if exists)
jenkinsfile_content: Content of the Jenkinsfile (pipeline script)
description: Optional job description
ctx: MCP context (for logging)
Returns:
Dict containing job creation/update result with status and job_url
Raises:
JenkinsError: Job creation/update failed
Input Schema
Name | Required | Description | Default |
---|---|---|---|
description | No | ||
jenkinsfile_content | Yes | ||
job_name | Yes | ||
server_name | Yes |
Input Schema (JSON Schema)
{
"properties": {
"description": {
"default": "",
"title": "Description",
"type": "string"
},
"jenkinsfile_content": {
"title": "Jenkinsfile Content",
"type": "string"
},
"job_name": {
"title": "Job Name",
"type": "string"
},
"server_name": {
"title": "Server Name",
"type": "string"
}
},
"required": [
"server_name",
"job_name",
"jenkinsfile_content"
],
"title": "create_or_update_job_from_jenkinsfileArguments",
"type": "object"
}