Document toolboxDocument toolbox

How do we disable deployment to a specific environment in Bamboo?

Assuming you don’t want to go to the trouble of setting up the necessary users, groups and permissions in Bamboo, you can introduce the option to disable specific Deployment Environments by using the built-in Bamboo Task type of “Script”. Details of this Task type are at the following Atlassian page: https://confluence.atlassian.com/bamboo/script-289277046.html

We suggest adding this Task at the start of all of the Deployment Environments that you wish to have the option to disable. Configure the Task as follows:

  1. Give it an appropriate description

  2. Check “Disable this task”

  3. set Interpreter to whatever you like. It won’t matter.

  4. set Script Location to “File”

  5. In the File field, write something like “THIS_DEPLOYMENT_ENVIRONMENT_IS_DISABLED_._DO_NOT_USE” which is guaranteed not to be found anywhere on disk.

  6. Leave the rest of the fields blank

Leave “Disable this task” checked until until you wish to lock down that particular Deployment Environment.

Once “Disable this task” is unchecked (i.e. the Task is enabled) this Task will fail on execution and thereby prevent the remaining Tasks in that Deployment Environment from continuing.

© 2015-2024 Data Migrators Pty Ltd.