小組自動化規則和改善的 AB# 驗證正式推出

我們很高興宣佈 GitHub 和 Team Automation 規則中的 Azure Boards 應用程式已改善 AB# 驗證已正式推出! 我們已改善 AB# 驗證,以便在工作專案的連結無效時收到通知。 在 Team Automation Rules 中,您現在可以設定每個待辦專案層級,根據子專案的狀態自動開啟和關閉/解析工作專案。

透過此更新,我們也在程式代碼掃描中引進自定義CodeQL查詢的支援! 這可讓您自行製作專為識別程式代碼基底特定問題而量身打造的查詢。

如需詳細資訊,請參閱版本資訊。

適用於 Azure DevOps 的 GitHub 進階安全性

Azure Boards

Azure Pipelines

適用於 Azure DevOps 的 GitHub 進階安全性

Azure DevOps 的 GitHub 進階安全性現在支援自定義 CodeQL 查詢

我們很高興宣佈在程式代碼掃描中推出自定義 CodeQL 查詢的支援! 這可讓您自行製作專為識別程式代碼基底特定問題而量身打造的查詢。 現在,您可以建立併發佈包含自定義查詢的套件、在管線中執行這些查詢,以及自定義與組織相關的弱點偵測。

如需在適用於 Azure DevOps 的 GitHub 進階安全性中使用自定義查詢進行程式代碼掃描的詳細資訊,請參閱 GitHub 進階安全性 Azure DevOps 的程式代碼掃描警示。

我們重視您的輸入。 如果您有任何問題或意見反應,建議您在 開發人員社群 與社群互動。

Azure Boards

GitHub 整合 - 改善的 AB# 驗證已正式推出

一些短期衝刺之前,我們宣佈了 GitHub 中 Azure Boards 應用程式改善 AB# 驗證的預覽。 我們已增強應用程式,以進一步通知使用者工作項目連結的有效性,協助他們在合併提取要求之前找出並修正任何問題。

經過數周的測試與意見反應,這項功能現在可供所有使用者使用 GitHub + Azure Boards 整合。

Screenshots of improved validation.

這是我們為了改善目前整合而製作的數個功能中的第一個功能。 請務必查看我們在公用藍圖上規劃的其他 Azure Boards + GitHub 整合功能

小組自動化規則已正式推出

我們很高興向 Azure DevOps Service 的所有客戶宣佈此功能的發行。

注意

這項功能將在未來兩到三周內推出。 在 2024 年 2 月初之前,貴組織可能無法使用。

您現在可以設定每個待辦專案層級,根據子項目的狀態,將工作項目的開啟和關閉(或解析)自動化。 我們嘗試解決的主要案例有兩種。

  • 當單一子項目啟動時,請啟動父代。
  • 關閉所有子專案時,請關閉父專案(或加以解決)。

若要啟用這些設定,請按兩下小組的待辦專案層級設定。 然後移至 [ 自動化 > 規則] 索引標籤,以查看您可以套用至待辦專案兩個不同的規則。 每個待辦專案層級(需求、功能、Epics)都可以根據小組想要的運作方式,以不同的方式設定。

Screenshots of team settings.

例如,當任何子工作設定為 [作用中] 時,請將父用戶劇本設為作用中。 然後,當所有工作完成時,請將 [用戶劇本] 設定為 [已關閉]。

Gif to demo closing user story.

您可以檢閱檔和此部落格文章,以深入瞭解此功能。

這項功能已根據此 開發人員社群 建議票證設定優先順序。

Azure Pipelines

在 1 月 31 日之前更新已淘汰的工作

我們將在 2024 年 1 月 31 日淘汰已淘汰的工作。 為了協助您識別使用這些工作的管線,我們已包含具有建議替代方案的警告訊息。 建議您在 2024 年 1 月 31 日之前更新管線,以使用較新的工作版本或替代方案。

Screenshot of task-specific deprecation warnings.

請參閱先前與已淘汰工作相關的公告:

Microsoft 裝載的代理程式使用 PowerShell 7.4

所有 Microsoft 裝載的 代理程式都會從 1 月 28 日起,開始使用 PowerShell 7.2 LTS 至 PowerShell 7.4 LTS。 請參閱 PowerShell 7.4PowerShell 7.4 正式運作的新功能。

記下重大變更,並據以更新您的腳本:

新的 Azure 服務連線秘密會在三個月內到期

Azure 服務 連線 Azure DevOps 建立秘密的地方,將有三個月的秘密到期,而不是兩年。

若要消除輪替秘密的需求, 請改為將服務連線轉換為 使用 工作負載身分識別同盟 。 您可以使用下列範例文稿,將多個 Azure 服務連線快速轉換為工作負載身分識別同盟:

#!/usr/bin/env pwsh
<# 
.SYNOPSIS 
    Convert multiple Azure Resource Manager service connection(s) to use Workload identity federation

.LINK
    https://aka.ms/azdo-rm-workload-identity-conversion

.EXAMPLE
    ./convert_azurerm_service_connection_to_oidc_simple.ps1 -Project <project> -OrganizationUrl https://dev.azure.com/<organization>
#> 
#Requires -Version 7.3

param ( 
    [parameter(Mandatory=$true,HelpMessage="Name of the Azure DevOps Project")]
    [string]
    [ValidateNotNullOrEmpty()]
    $Project,

    [parameter(Mandatory=$true,HelpMessage="Url of the Azure DevOps Organization")]
    [uri]
    [ValidateNotNullOrEmpty()]
    $OrganizationUrl
) 
$apiVersion = "7.1"
$PSNativeCommandArgumentPassing = "Standard" 

#-----------------------------------------------------------
# Log in to Azure
$azdoResource = "499b84ac-1321-427f-aa17-267ca6975798"
az login --allow-no-subscriptions --scope ${azdoResource}/.default
$OrganizationUrl = $OrganizationUrl.ToString().Trim('/')

#-----------------------------------------------------------
# Retrieve the service connection
$getApiUrl = "${OrganizationUrl}/${Project}/_apis/serviceendpoint/endpoints?authSchemes=ServicePrincipal&type=azurerm&includeFailed=false&includeDetails=true&api-version=${apiVersion}"
az rest --resource $azdoResource -u "${getApiUrl} " -m GET --query "sort_by(value[?authorization.scheme=='ServicePrincipal' && data.creationMode=='Automatic' && !(isShared && serviceEndpointProjectReferences[0].projectReference.name!='${Project}')],&name)" -o json `
        | Tee-Object -Variable rawResponse | ConvertFrom-Json | Tee-Object -Variable serviceEndpoints | Format-List | Out-String | Write-Debug
if (!$serviceEndpoints -or ($serviceEndpoints.count-eq 0)) {
    Write-Warning "No convertible service connections found"
    exit 1
}

foreach ($serviceEndpoint in $serviceEndpoints) {
    # Prompt user to confirm conversion
    $choices = @(
        [System.Management.Automation.Host.ChoiceDescription]::new("&Convert", "Converting service connection '$($serviceEndpoint.name)'...")
        [System.Management.Automation.Host.ChoiceDescription]::new("&Skip", "Skipping service connection '$($serviceEndpoint.name)'...")
        [System.Management.Automation.Host.ChoiceDescription]::new("&Exit", "Exit script")
    )
    $prompt = $serviceEndpoint.isShared ? "Convert shared service connection '$($serviceEndpoint.name)'?" : "Convert service connection '$($serviceEndpoint.name)'?"
    $decision = $Host.UI.PromptForChoice([string]::Empty, $prompt, $choices, $serviceEndpoint.isShared ? 1 : 0)

    if ($decision -eq 0) {

        Write-Host "$($choices[$decision].HelpMessage)"
    } elseif ($decision -eq 1) {
        Write-Host "$($PSStyle.Formatting.Warning)$($choices[$decision].HelpMessage)$($PSStyle.Reset)"
        continue 
    } elseif ($decision -ge 2) {
        Write-Host "$($PSStyle.Formatting.Warning)$($choices[$decision].HelpMessage)$($PSStyle.Reset)"
        exit 
    }

    # Prepare request body
    $serviceEndpoint.authorization.scheme = "WorkloadIdentityFederation"
    $serviceEndpoint.data.PSObject.Properties.Remove('revertSchemeDeadline')
    $serviceEndpoint | ConvertTo-Json -Depth 4 | Write-Debug
    $serviceEndpoint | ConvertTo-Json -Depth 4 -Compress | Set-Variable serviceEndpointRequest
    $putApiUrl = "${OrganizationUrl}/${Project}/_apis/serviceendpoint/endpoints/$($serviceEndpoint.id)?operation=ConvertAuthenticationScheme&api-version=${apiVersion}"
    # Convert service connection
    az rest -u "${putApiUrl} " -m PUT -b $serviceEndpointRequest --headers content-type=application/json --resource $azdoResource -o json `
            | ConvertFrom-Json | Set-Variable updatedServiceEndpoint
    
    $updatedServiceEndpoint | ConvertTo-Json -Depth 4 | Write-Debug
    if (!$updatedServiceEndpoint) {
        Write-Debug "Empty response"
        Write-Error "Failed to convert service connection '$($serviceEndpoint.name)'"
        exit 1
    }
    Write-Host "Successfully converted service connection '$($serviceEndpoint.name)'"
}

下一步

注意

這些功能將在未來兩到三周內推出。

前往 Azure DevOps 並查看。

如何提供意見反應

我們很樂意聽到您對於這些功能的看法。 使用說明功能表來回報問題或提供建議。

Make a suggestion

您也可以在 Stack Overflow 上的社群取得建議和您的問題。

感謝您!

丹·海雷姆