OctopusDeploy / cli

| Public | Next Generation of the Octopus CLI :octopus:
Other
35 stars 10 forks source link

feat: add bulk delete build information command #369

Closed hnrkndrssn closed 4 months ago

hnrkndrssn commented 4 months ago

Bulk delete build information command

// delete all build information for a package id
$ octopus build-information bulk-delete --package-id ThePackage
// delete specific build information for a package id
$ octopus build-info bulk-delete --package-id ThePackage --version 1.2.3 --version 1.2.4 --version 1.2.5

delete all build information for a package id

$ octopus build-info bulk-delete
? Select the Package ID you wish to delete: TheOtherPackage
? Select versions to delete? No
? You are about to delete the following build information BuildInformation-10010. This action cannot be reversed. To confirm, type 'delete': delete
✔ The BuildInformation-10010 were deleted successfully.

delete selected versions of build information for a package id

$ octopus build-info bulk-delete
? Select the Package ID you wish to delete: ThePackage
? Select versions to delete? Yes
? Select version(s) 1.2.4, 1.2.3
? You are about to delete the following build information BuildInformation-10005, BuildInformation-10007. This action cannot be reversed. To confirm, type 'delete': delete
✔ The BuildInformation-10005, BuildInformation-10007 were deleted successfully.

delete selected versions specified on the command line

$ octopus build-info bulk-delete --package-id ThePackage --version 1.2.5 --version 1.2.6 -y

[sc-83928]