Disable Jenkins Job

Action ID: jenkins:job:disable
NPM Package:

@backstage-community/plugin-scaffolder-backend-module-jenkins

Description

Disable an existing job jenkins given a name

Input Schema

PropertyTypeDescriptionRequired
jobNamestringName 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.

Copy
steps:
  - id: disable-legacy-jenkins-job
    name: Disable legacy Jenkins build
    action: jenkins:job:disable
    input:
      jobName: platform/team-a/catalog-service-build

Conditionally 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.

Copy
steps:
  - id: disable-selected-jenkins-job
    name: Disable selected Jenkins job
    if: ${{ parameters.disableLegacyJenkins }}
    action: jenkins:job:disable
    input:
      jobName: ${{ parameters.jenkinsJobName }}