团队自动化规则的正式发布和改进的 AB# 验证

我们很高兴地宣布,GitHub 和 Team Automation 规则中的 Azure Boards 应用改进的 AB# 验证已正式发布! 我们改进了 AB# 验证,以便在指向工作项的链接无效时收到通知。 在团队自动化规则中,现在可以配置每个积压工作级别,以基于子项的状态自动打开和关闭/解析工作项。

通过此更新,我们还在代码扫描中引入了对自定义 CodeQL 查询的支持! 这样,就可以创建自己的查询,这些查询专为识别特定于代码库的问题而定制。

有关详细信息,请查看发行说明。

适用于 Azure DevOps 的 GitHub Advanced Security

Azure Boards

Azure Pipelines

适用于 Azure DevOps 的 GitHub Advanced Security

Azure DevOps 的 GitHub 高级安全性中现在支持自定义 CodeQL 查询

我们很高兴地宣布推出对代码扫描中的自定义 CodeQL 查询的支持! 这使你能够创建自己的查询,这些查询专为识别特定于代码库的问题而定制。 现在,可以创建和发布包含自定义查询的包,在管道中执行这些查询,并自定义对组织相关的漏洞的检测。

有关在 GitHub Advanced Security for Azure DevOps 中使用代码扫描的自定义查询的详细信息,请参阅 用于 Azure DevOps 的 GitHub 高级安全性的代码扫描警报。

我们重视你的输入。 如果你有任何问题或反馈,我们建议你在开发者社区与社区互动。

Azure Boards

GitHub 集成 - 改进的 AB# 验证已正式发布

几个冲刺之前,我们宣布了 GitHub 中 Azure Boards 应用改进 AB# 验证的预览版。 我们增强了应用,以更好地通知用户工作项链接的有效性,帮助他们在合并拉取请求之前发现并修复任何问题。

经过数周的测试和反馈,此功能现在可供所有用户使用 GitHub + Azure Boards 集成使用。

Screenshots of improved validation.

这是我们为改进当前集成而做出的几个功能中的第一项。 请务必检查我们在公共路线图上规划的其他 Azure Boards + GitHub 集成功能

团队自动化规则已正式发布

我们很高兴向 Azure DevOps Service 的所有客户宣布此功能的发布。

注意

此功能将在未来两到三周内推出。 在 2024 年 2 月初之前,组织可能无法使用它。

现在可以配置每个积压工作级别,以基于子项的状态自动打开和关闭工作项(或解析)。 我们正尝试解决两个主要方案。

  • 激活单个子项后,激活父项。
  • 关闭所有子项后,关闭父项(或解析)。

若要启用这些设置,请单击团队的积压工作级别配置。 然后转到 “自动化 > 规则”选项卡 ,查看可应用于积压工作的两个不同的规则。 每个积压工作级别(要求、功能、史诗)都可以根据团队想要的工作方式以不同的方式进行配置。

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

从 1 月 28 日起,所有 Microsoft 托管代理 都将开始使用 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 上获得社区的建议和问题的答案。

此致

Dan Hellem