How to hide TeamCity configuration for selected users?

前端 未结 2 371
说谎
说谎 2021-01-18 01:07

I have one TeamCity project Dac.Test that contains 3 configurations: DEV, QA, PROD.

相关标签:
2条回答
  • 2021-01-18 01:52

    There is no way of managing user permissions per-build, this is available on a project level only. You could create a sub-project in the Dac.Test project to cater for this

    If you're looking for a way of stopping people from mistakenly running this build, the following approach will work.

    This method uses a prompt box that will pop up after you click the run button, it also needs input from the user confirming that they mean to run the build. No one can run this build by accident

    1. Go to your build configuration in the TeamCity UI
    2. From here, go to Edit Configuration Settings --> Parameters --> Add new parameter
    3. Enter something like 'Confirmation' as the parameter name
    4. Then beside 'Spec:', click the 'Edit...' button
    5. Set up the parameter as shown in the following screenshot:

    enter image description here

    You will now be prompted and asked for confirmation when you click the run button. The user will have to enter 'YES' in the prompt box that appears, any other value will stop the user from building: enter image description here

    0 讨论(0)
  • 2021-01-18 02:13

    This is best accomplished by using TeamCity's built-in role management. Roles allow you to set fine-grained permissions for users and groups. One potential issue, however, is that roles are scoped to projects (not build configurations). You'll need to create a separate Dac.Test QA project+configuration and provide your Testers the necessary privileges there. You'll also need to make sure that they are stripped of all privileges for the Dac.Test project.

    0 讨论(0)
提交回复
热议问题