Hi,
We are looking to implement the Bamboo Global Expiry policy, but we have been using the tool for a number of years now.
We need to retrospectively apply labels across historic artifacts chosen by our development teams, before we implement the Global Expiry Policy.
Is there any pain free options for doing this? Scripts? Plugins? that would aid in applying labels across historic artifacts on mass?
Thanks
You should be able to achieve this via the Bamboo REST API, which supports adding/removing labels from plans/builds - relevant resources are:
As usual, any REST client will do, I'm personally using the free edition of Postman to explore/test an API from the browser and HTTPie for the actual implementation from the command line.
The Bamboo REST API supports both XML and JSON representations, and I think the former is the default, so make sure to request JSON by specifying "Content-Type: application/json" if you prefer this nowadays easier to work with format.
@Steffen Opel _Utoolity_ I tried following the API doc and I am getting "HTTP Status 415 – Unsupported Media Type, The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource." even if I am passing proper json data with application/json content type.
Request:
curl -X POST -H “Content-Type: application/json” -H ‘authorization: Basic XXXXX‘ -d ‘{“name”:”UTWeekly”}’ https://<Bamboo URL>/rest/api/latest/result/{projectKey}-{buildKey}-{buildNumber}/label
Also tried witth Postman tool and got the same result.
<!doctype html><html lang="en"><head><title>HTTP Status 415 – Unsupported Media Type</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 415 – Unsupported Media Type</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unsupported Media Type</p><p><b>Description</b> The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource.</p><hr class="line" /><h3>Apache Tomcat/8.5.39</h3></body></html>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.