Description
Destroy 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
Remove a branch-specific Jenkins job after a feature branch is merged
Use this to clean up ephemeral Jenkins jobs created per branch. Place this step after repository merge or clean-up logic and after a fetch:template step if you generated values earlier.
steps:
- id: destroy-branch-job
action: jenkins:job:destroy
input:
jobName: ci/${{ parameters.serviceSlug }}-${{ parameters.branchName }}Decommission a service by deleting its Jenkins pipeline job
Use this when retiring a service or migrating CI to another system. The job name can be the full Jenkins folder path provided by the user input.
steps:
- id: destroy-service-pipeline
action: jenkins:job:destroy
input:
jobName: ${{ parameters.jenkinsJobName }} # e.g. platform/services/payments-service