/
How to bulk delete deployment projects in Bamboo using CLI
How to bulk delete deployment projects in Bamboo using CLI
This article explains how to bulk delete deployment projects in Bamboo server using the Bamboo Command Line Interface app.
Instructions
For this task, use the runFromCsv and deleteDeploymentProject CLI actions as explained:
- runFromCsv: Runs all the actions generated from the CSV file with the mentioned parameters.
- deleteDeploymentProject: Delete a deployment project by name or ID.
- runFromList: Run actions for each entry in a list with corresponding entry replacement variable.
To bulk delete the deployment projects:
Option 1:
Execute the following command If you know the name of the deployment projects:
--action runFromList --list "1540097, Deploy_project1" --common "-a deleteDeploymentProject --deploymentProject @entry@ --continue"
Option 2:
Execute the following command If you do not know the name of the deployment projects:
- Log in as a Bamboo administrator.
Navigate to Deploy > All deployment projects to view all the deployment projects in the Bamboo instance.
Take a note of the deployment project IDs or their names that are to be deleted.
- Create a CSV file named projects.csv with the list of the deployment projects to be deleted. These deployment projects are the ones noted in the previous step.
Execute the following command:
--action runFromCsv --file "/Downloads/Bamboo/projects.csv" --common "-a deleteDeploymentProject --continue"
The output displayed on the terminal is similar to:
--action runFromCsv --file "/Downloads/Bamboo/projects.csv" --common "-a deleteDeploymentProject --continue" Run: --deploymentProject "1540097" -a deleteDeploymentProject Deployment project '1540097' deleted. Run: --deploymentProject "Deploy_project1" -a deleteDeploymentProject Deployment project 'Deploy_project1' deleted. Run completed successfully. 2 actions were successful from file: /Downloads/Bamboo/projects.csv
- It is recommended to test the commands in a non-production environment, or run the action with --simulate parameter to verify the behaviour before deploying.
- Ensure you have the Bamboo Command Line Interface app installed in your Bamboo instance.
, multiple selections available,
Related content
How to delete all projects in Bamboo using Bamboo Command Line Interface (CLI)
How to delete all projects in Bamboo using Bamboo Command Line Interface (CLI)
More like this
How to get the list of deployment projects in a file using Bamboo Command Line Interface (CLI)
How to get the list of deployment projects in a file using Bamboo Command Line Interface (CLI)
More like this
How to export a deployment project to a file using Bamboo CLI
How to export a deployment project to a file using Bamboo CLI
More like this
How to remove all jobs in Bamboo plan using Bamboo Command Line Interface (CLI)
How to remove all jobs in Bamboo plan using Bamboo Command Line Interface (CLI)
More like this
How to remove all tasks in Bamboo Job using Bamboo Command Line Interface (CLI)
How to remove all tasks in Bamboo Job using Bamboo Command Line Interface (CLI)
More like this
Create Bamboo plans in bulk using Bamboo Command Line Interface (CLI)
Create Bamboo plans in bulk using Bamboo Command Line Interface (CLI)
More like this