在将一堆 YAML 管道转换为使用模板来保存作业逻辑以及定义管道变量后,我遇到了一个奇怪的问题。管道运行得很好,但是我收到“最近检测到的一些与管道触发相关的问题”。管道摘要页面顶部的警告和仅查看详细信息指出:“配置触发器失败,请再次编辑并保存管道。”
这里奇怪的部分是管道工作得很好,包括触发器。没有任何问题,也没有提供有关假定问题的更多细节。目前,我已经为管道覆盖了 YAML 触发器,但我也在 YAML 中定义了相同的触发器,看看这是否有帮助(但没有)。
我正在寻找有关可能导致此问题的原因的任何想法,或者鉴于错误/警告提供的完全缺乏详细信息,我如何能够进一步对其进行故障排除。这给开发人员带来了很多困惑,他们认为警告可能导致他们的构建出现问题。
这是主要管道。构建存储库是一个共享存储库,用于保存在构建系统中的多个存储库中使用的代码。dev.yaml 包含开发环境特定的变量值。共享保存基于管道运行的分支有条件设置的变量。
name: ProductName_$(BranchNameLower)_dev_$(MajorVersion)_$(MinorVersion)_$(BuildVersion)_$(Build.BuildId)
resources:
repositories:
- repository: self
- repository: build
type: git
name: Build
ref: master
# This trigger isn't used yet, but we want it defined for later.
trigger:
batch: true
branches:
include:
- 'dev'
variables:
- template: YAML/variables/shared.yaml@build
- template: YAML/variables/dev.yaml@build
jobs:
- template: ProductNameDevJob.yaml
parameters:
pipelinePool: ${{ variables.PipelinePool }}
validRef: ${{ variables.ValidRef }}
Run Code Online (Sandbox Code Playgroud)
然后这就是实际工作 yaml 的开始。它提供了一种可重用的作业定义,可以在多个总体管道中使用:
parameters:
- name: dependsOn
type: object
default: {}
- name: …Run Code Online (Sandbox Code Playgroud) azure-devops azure-devops-server azure-pipelines-yaml azure-devops-server-2020
使用Azure DevOps Server 2019 RC可以在新集合上启用继承的流程模型(请参阅发行说明)。有没有办法对现有集合使用继承的流程模型,而没有对流程进行自定义
tfs-process-template azure-devops-server azure-devops-server-2019
几个月前,我在 Azure Artifacts 中创建了一个私有 npm 源。使用此提要的身份验证工作正常。
最近,其他人开始使用此提要,但使用他们从 Azure Artifacts 生成的令牌进行身份验证对他们不起作用。安装 npm 时出现以下错误
npm 错误!无法进行身份验证,您的身份验证令牌似乎是
无效的。npm 错误!要更正此问题,请尝试再次登录:
npm 错误!登录
在 npm 调试日志中有这个错误
详细堆栈错误:无法进行身份验证,需要:承载,基本领域 =“{{redacted url}}”,NTLM
我们放在全局 .npmrc 文件中的身份验证令牌的结构似乎在 Azure Artifacts 中发生了变化
从:
; Treat this auth token like a password. Do not share it with anyone, including Microsoft support. This token expires on or before 27/02/2020.
; begin auth token
//{{redacted URL}}/_packaging/{{redacted user name}}/npm/registry/:_authToken={{redacted token string}}
//{redacted URL}}/_packaging/{{redacted user name}}/npm/:_authToken={{redacted token string}}
; end auth token
Run Code Online (Sandbox Code Playgroud)
到
; Treat this auth …Run Code Online (Sandbox Code Playgroud) npm azure-devops azure-artifacts azure-devops-server azure-devops-server-2019
看起来TFS每次构建仅支持一个存储库。一旦我需要使用一些单独存储的第三方库,这对我来说还不够。
我可以为此使用GIT子模块,但是在这种情况下,构建将不会与提交和工作项相关联,因为它会忽略来自子模块的提交。此外,子模块中的更改不会触发构建。
是否可以使用插件,扩展名或类似的东西定义具有多个存储库的构建?
我正在使用 Azure DevOps Server (TFS),并且我在我的测试和生产服务器中注册了部署池代理,现在我需要卸载或删除我的服务器和 UI 上的配置,我该怎么做才能运行脚本或只需删除文件或您能帮我做些什么。
tfs azure-devops azure-devops-self-hosted-agent azure-devops-server azure-devops-server-2019
我们正在运行 Azure DevOps 2019。用户均通过其域帐户进行身份验证,并使用 Google Chrome。
他们使用 Windows 用户名和密码登录 Azure DevOps Server。我希望域中的用户能够自动登录。我仍然希望不在域中的用户能够手动登录。
是否可以配置 IIS 来执行此操作?
目前,如果我查看 IIS 身份验证配置,它会显示:
谢谢
按照此处的文档,我尝试vmImage: 'ubuntu-latest'在 Azure Devops Server 中使用。
如何vmImage: 'ubuntu-latest'在我的 Azure DevPps 服务器中使用?
agent azure-devops azure-devops-self-hosted-agent azure-devops-server
我们有一个构建代理(一个自托管的构建服务器),它显然满足 msbuild,但不满足 Visualstudio,因此我们尝试安装 vs.
我在服务器上安装了vs2022社区并重新启动。
当在存储库中检测到更改时,这些邮件仍然会发送。
在池 XXX 中找不到满足以下需求的代理:visualstudio。所有要求:msbuild、visualstudio、Agent.Version -gtVersion 2.192.0
社区不是一个选择吗?
visual-studio azure-pipelines azure-devops-server visual-studio-2022
我正在尝试将项目从一个组织项目迁移到另一个项目。\n从源 Azure Devops 项目到目标 DEvops 项目。
\nReflectedWorkItemIDFieldName 应该是什么?
\n我尝试将其更改为:
\nCustom.ReflectedWorkItemId\nReflectedWorkItemId\nProcessName.ReflectedWorkItemId\nGlobalWit.ReflectedWorkItemId\nRun Code Online (Sandbox Code Playgroud)\n但这没有帮助。请帮我
\nMicrosoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by \xc2\xab[Custom.ReflectedWorkItemId]\xc2\xbb\nRun Code Online (Sandbox Code Playgroud)\n===
\n"Source": {\n"Collection": "https://dev.azure.com/somegDevOps/",\n"Project": "ContosoAir",\n"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",\n"AllowCrossProjectLinking": false,\n"PersonalAccessToken": "Intentionally removed"\n},\n"Target": {\n"Collection": "https://dev.azure.com/ITIDEVOPSTEAM/",\n"Project": "ContosoAir-Migrated",\n"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",\n"AllowCrossProjectLinking": false,\n"PersonalAccessToken": "Intentionally removed"\n},\nRun Code Online (Sandbox Code Playgroud)\n azure-devops vsts-sync-migrator azure-devops-server azure-devops-migration-tools
我一直坚持在 azure Devops 管道中使用构建变量。
我试图实现的目标:使用当前时间戳创建变量,并使用此变量设置构建名称和工件版本(用于可追溯性)。
在我当前的配置中,powershell 脚本已成功执行,但变量 foo 在 npm 步骤中为空(请参阅下面的 yml 代码)。
variables:
system.debug: true
name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)-$(Hours)$(Minutes)$(Seconds)
[...]
steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: 'Write-Host "Setting up the date time for build variable"
$date=$(Get-Date -format yyyyMMdd-Hmmss)
Write-Host "##vso[task.setvariable variable=foo]$date"'
- task: Npm@1
inputs:
command: 'custom'
customCommand: '--no-git-tag-version version prerelease --preid=dev-$(foo)'
displayName: 'npm version prerelease'
Run Code Online (Sandbox Code Playgroud)
我的问题:为什么 npm 步骤中的变量 foo (通过 powershell 引入)为空?有没有办法使用自我引入的变量 foo 设置构建名称(对构建名称和工件版本使用相同的时间戳)?
我们在 Azure DevOps Server 中有一个用于 NuGet 包的自定义源。上传 Microsoft.AspNetCore.Authentication.Core 2.2.0 包时出现问题,现在我们的提要中有一个错误的包。
根据几年前问和回答的这个问题,不能更换包,只能增加数量并推送新版本。
当我们不控制包的版本号需要替换坏上传的时候该怎么办?
现在,我们能看到的唯一选择是创建一个新提要并从旧提要重新上传所有内容。
以下内容适用于 Azure DevOps 服务(云):
curl ... https://vssps.dev.azure.com/acme/_apis/graph/users
Run Code Online (Sandbox Code Playgroud)
但是,对于我的本地安装,以下所有选项均收到 404 错误:
curl ... https://tfs.acme.com/_apis/graph/users
curl ... https://vssps.tfs.acme.com/_apis/graph/users
curl ... https://tfs.acme.com/test-collection/_apis/graph/users
Run Code Online (Sandbox Code Playgroud)
我知道这不是凭据问题,因为我成功地进行了其他 api 调用。
我找不到任何本地文档。云版本:https://learn.microsoft.com/en-us/rest/api/azure/devops/graph/users/list ?view=azure-devops-rest-5.1
tfs azure-devops azure-devops-rest-api azure-devops-server azure-devops-server-2019
azure-devops ×6
tfs ×4
azure-devops-self-hosted-agent ×2
agent ×1
azure-devops-migration-tools ×1
build ×1
git ×1
npm ×1
ntlm ×1
powershell ×1
tfsbuild ×1