从构建中标记git版本-在git中找不到标记

Pet*_*eay 2 git tagging azure-devops azure-pipelines

我正在使用Visual Studio Online从Team Services(以前是Visual Studio Online)的git存储库构建Visual Studio解决方案。该构建在向Team Services注册并发布到Team Services的本地构建代理上进行。

在构建定义的“存储库”设置中,将“标签源”设置为“成功构建”,并指定了“标签格式”。

构建日志显示版本已标记:

Created ref refs/tags/BuildName - SolutionName - Release_1.2.16134.03 at c1fa2a4b9e0f3365e2269bb947af7819faf40354.
Run Code Online (Sandbox Code Playgroud)

在构建的“工件”选项卡上,它显示“ build.sourceLabel”,并具有指向以下内容的超链接:

refs/tags/BuildName - SolutionName ...
Run Code Online (Sandbox Code Playgroud)

但是,当我单击超链接时,出现了TFS错误:

TF401175:The version descriptor <Tag: BuildName - SolutionName - Release_1.2.16134.03 > could not be resolved to a version in the repository RepositoryName
Run Code Online (Sandbox Code Playgroud)

我也无法在本地git存储库中找到任何标签:

git pull --tags
git tag
Run Code Online (Sandbox Code Playgroud)

什么也没显示。

我是否需要任何其他步骤将源标签从构建代理推送到Team Services?该链接上的最高答案似乎表明我所做的事情是正确的(但是我没有使用托管池)。

我的存储库设置如下所示:

储存库设定

有没有其他人有这个问题?有什么建议么?

提前致谢。

Edd*_*SFT 5

这是由标签名中的空格引起的。根据您提供的日志,您的构建定义名为“ BuildName-SolutionName-Release”,并且您正在使用构建定义名称来创建标记。这将导致标记名称中的空白。更新“标签格式”以使用其他名称格式,或者更新您的构建定义名称以删除其中的空格(例如:BuildName-SolutionName-Release)应该可以解决此问题。