Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3641

Modify a parameter of a running (or finished) build in TeamCity via REST API

$
0
0

I am trying to modify a parameter (e.g. configuration parameter) of a running (or finished) build named 'lock' and want to insert the value: "true".

My initial thought was to send a rest api call with a service message which sets the parameter.

    response = requests.post(f"{teamcity_build_api_endpoint}/id:{build_id}/log", headers=header_text_plain, data="##teamcity[setParameter name='lock' value='true']")

Even though, this is not throwing any exceptions it also does not modify the parameter.

What am I doing wrong? Is this even possible to alter parameters via rest api?

Background information:
What I need is a shared parameter for a couple of builds which are triggered from an initial one. The triggered builds should report their result into a parameter. For that reason I wanted to introduce a lock mechanism so that only one triggered build can change the parameter at the time.


Viewing all articles
Browse latest Browse all 3641

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>