設定Build Pipeline與Release Pipeline的執行權限
先前我們建立Build pipeline和Release pipeline的時候使用的都是管理者的帳號,可以建立Pipeline自然在執行的部份也是沒有任何問題。問題是Pipeline建立完成之後,接下來手動觸發執行的動作可能是交待給別人去執行,所以就會需要替實際執行者設定權限才行。
首先,我在Project Settings的Permissions建立了兩個Group,分別是Build Pipeline Executor與Release Pipeline Executor:

接著到Build Pipeline或Release Pipeline叫出隱藏的選單,選擇Manage security/Security:

設定權限的對話框長得都差不多,左邊會列出Groups與Users,透過上面的搜尋框搜尋到要設定的Group或User,然後在右邊進行設定:

像上面這張是設定單獨的Build pipeline的權限,我加入了Build Pipeline Executor這個Group,並且在右邊設定了四個項目的權限。
Build Pipeline的權限設定也可以設在整個Build Pipeline上,如下圖我在整個Build Pipeline的部份設定了一個User:


上面第一張是設定在整個Build Pipeline的截圖,第二張則可以看到從其中的一個Build Pipeline看到相同的User在右邊權限項目是顯示為inhertied。
Release Pipeline的設定也差不多:

透過上面的這些設定,我們就可以將Pipeline的執行權限設定給其他人,目前的Azure DevOps也已經允許Stakeholder擁有執行Pipeline的權限,所以如果只是要執行Pipeline的任務,不一定要將使用者的角色設定為Basic(還記得嗎?Basic要計費的)。
原文連結泰克哪裡去
Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!