gpt4 book ai didi

powershell - 如何从 Powershell 设置 TeamCity 构建状态?

转载 作者:行者123 更新时间:2023-12-04 06:52:31 26 4
gpt4 key购买 nike

我正在尝试从 Powershell 设置 Team City 构建的状态。我找到了如何从 Windows cmd 执行此操作:

##teamcity[buildStatus status='FAILURE' text='A non-standard URL has been committed to SVN']
EXIT 1

当作为 cmd 运行时,它可以完美运行;但是,我需要在 Powershell 脚本中执行此操作。谁能指出我正确的方向?我在 Powershell 中按原样尝试过,但井号就像注释一样。

谢谢。

最佳答案

# sing 是单行注释的开头,您必须将其设为常规字符串。只需将其放在引号中:

"##teamcity[buildStatus status='FAILURE' text='A non-standard URL has been committed to SVN']"
exit 1

关于powershell - 如何从 Powershell 设置 TeamCity 构建状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14821259/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com