Description
This suggestion comes from requests made in the Atlassian Community (https://community.atlassian.com/t5/Bamboo-questions/Why-doesn-t-Bamboo-s-REST-API-support-reading-and-writing/qaq-p/958960, https://community.atlassian.com/t5/Bamboo-questions/How-do-I-get-Deployment-variables-via-REST-API/qaq-p/633329) and other sources in which find very difficult setting up Variables in Bamboo, forcing users to manage them from Bamboo's UI instead.
As it stands now, Bamboo Java Specs provides us with a way to work with Variables in Bamboo (https://docs.atlassian.com/bamboo-specs-docs/6.7.2/specs-java.html#variables). However, this approach seems to be restricted to Plan / Environment variables as there is/are no example on making variables available to the Global scope in Bamboo.
There is no example in Variables related to Environment variables, but here is an example:
Deployment deployment = new Deployment(new PlanIdentifier("PROJ", "PLAN"), "My Deployment") .environments(new Environment("My Environment") .variables(new Variable("myEnvironmentVariable","FROM ENVIRONMENT")));
The downside of using Bamboo Java Specs is that you have to set up your environment with Maven, Java and such in order to publish your changes against your Bamboo Server instance. If this is not the case, then you would required to go through the repository configuration, making your source code available as Specs in Bamboo, setting you Git, commit your changes and so on...
For reasons described above, it would be much easier/appreciated having REST API endpoint available for:
- viewing, creating, updating, deleting Global Variables
- viewing, creating, updating, deleting Plan Variables
- viewing, creating, updating, deleting Environment Variables
At the moment, there are two endpoint that can be used to view variables and they are described in BAM-16056 and BAM-18006. However, you have to consume Bamboo actions in order to create variables (as described in https://community.atlassian.com/t5/Bamboo-questions/How-do-I-get-Deployment-variables-via-REST-API/qaq-p/633329), meaning that you have to dig into web browser requests in order to get the correct action and parameters to create variables. Not to mention how difficult it is to update or delete a variable (in which requires its id). Unfortunately, not everyone has knowledge in web requests, meaning that users should have a way to accomplish things (configuration in this case) in an easier manner.
Attachments
Issue Links
- mentioned in
-
Page Loading...