5

In a TeamCity build configuration, I have added a System parameter with name "system.UploadCdn" and spec as below:

 "checkbox description='UploadCdn' label='UploadCdn' display='prompt' checkedValue='Upload'"

I need to reset this parameter to "Unchecked State" after the build completes without having to click on the Reset link. As per Is there a way to force a default value for a parameter in TeamCity and not lose it once a different value has been set?, I have added a last build step as below.

Runner type: PowerShell Script : Source Code Script Source: ##teamcity[setParameter name='UploadCdn' value=' '] Script execution mode : Execute .ps1 from external file

But it is not working. What am I missing?

Sangam Belose
  • 4,262
  • 8
  • 26
  • 48
P Sarmah
  • 59
  • 4
  • I am facing the same issue. I tried these: 1. Reset parameter value of the project via API; 2. Reset parameter value of the build via API. In both cases the value is set to what I send in with curl, but when the user click "Run...", the previously entered value shows up. If I click "Reset", the value is reset to the value I set via API. So, you command, and my API are setting the default values in the configuration correctly, but the TeamCity UI caches the previously entered value. I didn't find a way to clear that. But maybe this helps someone to figure it out. – Patkos Csaba May 04 '18 at 15:11
  • Similar situation for me. I'm setting a pipeline with 40+ steps that are selected with a checkbox. I need these checkboxs to revert to their unchecked state after each build as sometimes we build again with a different set of configuration choices and our build is corrupted because there was a checkbox that didnt reset that we missed. – Jacob Chesley Oct 24 '18 at 21:36

0 Answers0