Description
Disable an existing job jenkins given a name
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| jobName | string | Name of jenkins item |
Output Schema
No output schema defined for this action.
Usage Examples
Disable a foldered Jenkins job after decommissioning a service
Disables a specific Jenkins job in a nested folder path when a service is retired or builds must be paused. Use this to prevent accidental deployments from legacy pipelines.
steps:
- id: disable-legacy-jenkins-job
name: Disable legacy Jenkins build
action: jenkins:job:disable
input:
jobName: platform/team-a/catalog-service-buildConditionally disable a user-selected Jenkins job during migration
Disables a Jenkins job only when a template parameter indicates Jenkins is being retired for the service. The job name comes from user input so the same template can handle different teams and folders.
steps:
- id: disable-selected-jenkins-job
name: Disable selected Jenkins job
if: ${{ parameters.disableLegacyJenkins }}
action: jenkins:job:disable
input:
jobName: ${{ parameters.jenkinsJobName }}