在声明变量yaml时,为什么我会遇到错误
我的代码在下面有效,
variables:
- group: docker-settings
我需要添加一个在条件中使用的变量,因此我将变量插入下面的变量,但后来又有一个错误?如果我删除-group:docker -settings它可以工作,如果我删除了ismaster行,则它可以正常工作,但在那里不喜欢它们吗?我在做什么错?
variables:
- group: docker-settings
isMaster: $[eq(variables['Build.SourceBranch'], 'refs/heads
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用了
name/value
符号,并根据 ms示例和set master 而不是 main 。我想这就是您想要的。Microsoft示例:
不要放弃yaml和azure devops; - )
I used the
name / value
notation and fixed the value based on the MS example and set master instead of main. I guess this is what you want to have.Microsoft example:
Don't give up with yaml and Azure DevOps ;-)