I made a build in TeamCity which deploys code to live server. As a precaution I want to disable that button "run" can be clicked by mistake.So I want to have an additional level of checking "whether I'm sure" I want to click "run" button. Is it possible to accomplish? Thanks in advance!
Unless explicitly configured, the simple authorization mode is used in TeamCity Professional and per-project is used in TeamCity Enterprise. To change the authorization mode, go to Administration | Authentication and enable/disable the Enable per-project permissions option.
If a project is not in an active development state, you can archive it using the Actions menu in the upper right corner of the Project Settings page. On the Archive project screen, you can choose whether to cancel the builds which are already in the queue using the corresponding option (enabled by default).
I don't think there is a way to disable the run button.
An approach I've used is to have a Property which gets passed to the build script which needs to be true for the script to run, it's false or not set then the build script throws an error. Then in the build configuration on the Properties & Environment Variables page I set the property to false. Now whenever I need to run the script I have to use the "Run custom build" button (the "| ...
" bit beside the run button), then I set the value to true before hitting the build button.
Another, easier option, is to add a agent requirement to your build such that only the production server's agent can meet it (e.g. env.COMPUTERNAME equals MyProductionServer01), and then disable the agent with a note about "locking" the production build. This will prevent the build from actually running if you accidentally click the Run button.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With