---
title: "Configure different build jobs for different branches"
canonical: "https://support.appfire.com/space/JENK/150897065/Configure%20different%20build%20jobs%20for%20different%20branches"
format: markdown
---
> Macro (aura-html)

With the Bitbucket Branch Source plugin, you can configure different build jobs for different branches from the Jenkinsfile for multi-branch projects. The sample Jenkinsfile below specifies different build jobs for branches, development, and production.

```
pipeline {
    agent any
    stages {
        stage('Build') {
            sh 'echo "Building project"'
        }
        stage('Test') {
            sh 'echo "Running unit tests"'
        }
        stage('Deliver for development') {
            when {
                branch 'development' 
            }
            sh 'echo "This is only run for the development branch"'
        }
        stage('Deploy for production') {
            when {
                branch 'production'  
            }
            sh 'echo "This is only run for the production branch"'
        }
    }
}
```

For more information, see the Jenkins [build-a-multibranch-pipeline-project](https://jenkins.io/doc/tutorials/build-a-multibranch-pipeline-project/) document.