Azure管道对同一提交触发多次问题。
创始人
2024-09-29 19:00:11
0
  1. 检查触发器设定是否正确,以避免错误的设定而导致重复触发。可以参考以下代码示例:

resources: repositories: - repository: MyRepo type: git name: MyProject/MyRepo trigger: branches: - master tags: - v*

  1. 确认提交的唯一性,以避免重复提交。如使用“--force”强制提交就可能会发生重复提交的问题。

  2. 在管道中使用缓存,可以减少不必要的重复运行。可以参考以下代码示例:

steps:

  • task: [email protected] inputs: key: 'node | "$(Agent.OS)" | **/package-lock.json' restoreKeys: 'node | "$(Agent.OS)"' displayName: 'npm ci'

  • task: [email protected] inputs: key: 'node | "$(Agent.OS)" | **/*.js' restoreKeys: 'node | "$(Agent.OS)" # this creates a restore key for node, which allows us to preserve node_modules across pipeline runs regardless of whether we've updated our dependencies. displayName: 'npm run build' condition: ne(variables['Build.Reason'], 'PullRequest') # we only want to build from code changes in the master branch

  • task: [email protected] inputs: key: 'node | "$(Agent.OS)" | **/node_modules' restoreKeys: 'node | "$(Agent.OS)"' displayName: 'npm pack' condition: ne(variables['Build.Reason'], 'PullRequest') # we only want to build from code changes in the master branch

  • task: [email protected] inputs: packageType: 'npm' versionSpec: '$(PackageVersion)' feed: 'MyFeed' projectName: 'MyProject' description: 'Package description' displayName: 'npm publish'

  1. 多次触发管道时,可以在日志中查看是否有重复的提交记录。如果有,则需要检查提交记录的唯一

相关内容

热门资讯

重大科普!hhpoker怎么开... 您好,we-poker是什么软件这款游戏可以开挂的,确实是有挂的,需要了解加微【136704302】...
盘点十款!pokemmo手机脚... 1、盘点十款!pokemmo手机脚本辅助器,wepoker有辅助功能吗,黑科技教程(有挂方法);详细...
实测分享!we poker免费... 实测分享!we poker免费辅助器,hhpoker可以开挂吗,系统教程(有挂软件)1、点击下载安装...
六分钟了解!wepoker有脚... 六分钟了解!wepoker有脚本吗,wepoker插件下载,微扑克教程(有挂技巧)是一款可以让一直输...
推荐一款!wepoker透视苹... 1、推荐一款!wepoker透视苹果系统,悦扑克脚本,教你攻略(有挂软件)。2、wepoker透视苹...
实测分享!hhpoker可以控... 实测分享!hhpoker可以控制吗,aapoker如何设置胜率,必赢方法(有挂攻略);支持多人共享记...
揭秘!we poker辅助器,... 揭秘!we poker辅助器,hhpoker哪个俱乐部靠谱,透视教程(有挂方法)1、许多玩家不知道h...
科普分享!aapoker辅助器... 科普分享!aapoker辅助器怎么用,德州局透视脚本免费版下载手机版,微扑克教程(有挂教程);支持2...
今日公布!hhpoker怎么破... 今日公布!hhpoker怎么破解,wepoker透视脚本是什么,规律教程(有挂神器);1.wepok...
交流学习经验!wepoker插... 1、交流学习经验!wepoker插件辅助,wepoker一直输的号能继续打吗,技巧教程(有挂软件)2...