Multibranch Job Tear Down

ID: multibranch-job-tear-down

This plugin triggers/schedules a job to run when a multibranch workflow job is disabled or deleted. Essential use case is you have a multibranch job that spins up some infrastructure like a server, when the job is deleted this plugin enables you to tear down said infrastructure and clean up after yourself.

Basic Setup

There are three ways to use this plugin but they require that you create a job that accepts a String parameter of `git_url` and `branch_name`.

Express Setup

Simply create a job named `job-tear-down-executor` the plugin automatically detects if this job is present and will send all branch deletions to this job.

Configure the Job

In the global setting section of Jenkins you can configure the job name that should be executed if you don't want to call your job `job-tear-down-executor`

Customize for your pipeline

If you need more fine tune control of which job to execute you can include the following in your pipeline. 

Pipeline Example
//Scripted Pipelines

//Declarative Pipelines
options {
  branchTearDownExecutor 'my-special-job'

Change Log

 - 1.1

  • Filter out global shared pipeline library scm's from the teardown git_url variable

- 1.0

  • Initial Version

ArchivesGet past versions
Version: 1.2
Requires Jenkins 2.115
Installs: 257
This plugin has no labels
Cesar Aguilar
Help us improve this page!
This content is served from the Jenkins Wiki the read-only state. We recommend moving the plugin documentation to GitHub, see the guidelines.