Help needed in triggering an Team City Build
Answered
Hi Team,
I am looking some reference/examples on triggering a build with adding new system.properties parameter using buildqueue Post API call. Can you please let me know how can we add a new parameter and kickoff the build ?
Thanks
Chaitanya
Please sign in to leave a comment.
Hello Chaitanya,
Some basic examples regarding the POST to /app/rest/buildQueue could be found here: https://www.jetbrains.com/help/teamcity/rest-api.html#RESTAPI-Buildnodeexample (and example of build triggered with parameters is the second there).
A minimal example including the system.* property:
Please let me know if this helps.
Thanks for your response
I want to create a new "SearchString" System.Property so tried with below format but no luck.
In general i am able to trigger a build using (buildqueue post) with the below Json format data but
after adding the SearchString tag as below i am able to trigger the build but this new property is not showing up in the parameters.
1. {"buildType": {"id": "IDOFTHETEST"},"properties":{"task":"DATA"},"property":{"name":"system.SearchString", "value":"Test"}} --> (Not working)
2. {"buildType": {"id": "IDOFTHETEST"},"properties":{"task":"DATA"},"name":"system.SearchString", "value":"Test"} ---> (Not working)
Pls let me know if i am doing some thing wrong here. Thanks in advance.
Hello!
With JSON format, please give a try to this format:
{"buildType": {
"id": "IDOFTHETEST"
},
"properties": {
"property": [{
"name": "task",
"value": "DATA"
}, {
"name": "system.SearchString",
"value": "Test"
}
]
}
}