在CI/CD服务器中,如何确定要包含在nx affected:build --base=master~1 --head=master命令中的提交范围?
https://nx.dev/react/api/workspace/npmscripts/affected-build
nx affected
Run task for affected projects
Run command using --base=[SHA1] --head=[SHA2] (affected by the committed changes):
--base Base of the current branch (usually master) [string]
--head Latest commit of the current branch (usually HEAD) [string]例如,对于只有一次提交到master触发一次构建的用例来说,这将是微不足道的。但是,如果是2次或更多的提交触发了CI/CD上的构建,那么我如何确定构建运行的最后一次提交,以便确定要使用的--head参数的提交范围?
发布于 2020-04-30 18:00:19
答案很晚,但我想最好的方法是在每次提交时触发CI,然后只有在有任何影响更改的情况下才继续。
这也将减少构建、测试和部署所需的时间,因为它们只做较小的更改块。
但我也猜你已经找到了一个可行的解决方案。
https://stackoverflow.com/questions/59888473
复制相似问题