Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Update repository variable

Erez_Amihud December 18, 2019

Hi, I am trying to update a repository variable value (so that it will change for every pipeline), using curl (I need it to be called in bash), through that link:

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/deployments_config/environments/%7Benvironment_uuid%7D/variables?_ga=2.39681763.1972089925.1576664666-1196990021.1566130965#post

but I didn't quite understood how to use it, can someone show an example/ another way to do it?

Thanks in advance

1 answer

1 accepted

0 votes
Answer accepted
ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2019

I don't have an example at hand but what I noticed is that the link you provided is not about setting a repository variable, but about something different called a deployment variable within a configured deployment.

Did you mean

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines_config/variables/ - to obtain existing variables (UUID etc.) or create new ones (UUID etc.).

and

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines_config/variables/%7Bvariable_uuid%7D - to change the value of a variable?

In any case I can't tell you whether or not calling the API - even if successful - will set the variables value in the context you would like to use it. That is merely because it is not clear from your question what you're trying to do down to such a specific level.

Erez_Amihud December 22, 2019

solved it with the links, thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events