防止 TFS 删除 build/release 上的节点模块
Prevent TFS from deleting Node Modules on a build/release
我有一个本地 TFS 服务器,我试图在其中加速 CI/CD 应用程序的 CI/CD。发布过程中最长的部分是 npm 安装,并且在每次触发(或环境发布)时删除整个放置文件夹。理想情况下,我希望不删除 node_modules 文件夹,以便 npm install 只需要检索新包。
我无法截取设置的屏幕截图,所以我会尽力描述它们。
构建:
- 复制文件(内容:***, .angular-cli.json)
- 发布工件(发布路径 $(build.artifactstagingdirectory))
发布:
- npm 安装(工作文件夹 $(System.DefaultWorkingDirectory/app-name/drop/projectartifiacts)
- ng构建(不重要)
- 上传(不重要)
我尝试在 Build 上设置 Clean = false,Clean Options = sources。然而,这似乎并没有帮助。而且每建一个环境,还是会破坏之前的掉落
关于如何让放置文件夹保留 node_modules 文件夹的任何想法?
感谢您的宝贵时间。
清理存储库时无法保留部分源代码。
为了加快 CI/CD,您不应启用 Clean 选项。
In general, for faster performance by your private agents, don't clean
the repo. In this case to get the most performance advantage, make
sure you are also building incrementally.
Source link : Clean the local repo on the agent
但是,如果是 option.Thus,您可以将 node_modules 文件夹签入源代码管理,它将在获取源代码步骤中检索。同时禁用 Repositoy 和 Build setp 的清理选项。
参考这篇文章:checking in node_modules
我有一个本地 TFS 服务器,我试图在其中加速 CI/CD 应用程序的 CI/CD。发布过程中最长的部分是 npm 安装,并且在每次触发(或环境发布)时删除整个放置文件夹。理想情况下,我希望不删除 node_modules 文件夹,以便 npm install 只需要检索新包。
我无法截取设置的屏幕截图,所以我会尽力描述它们。
构建:
- 复制文件(内容:***, .angular-cli.json)
- 发布工件(发布路径 $(build.artifactstagingdirectory))
发布:
- npm 安装(工作文件夹 $(System.DefaultWorkingDirectory/app-name/drop/projectartifiacts)
- ng构建(不重要)
- 上传(不重要)
我尝试在 Build 上设置 Clean = false,Clean Options = sources。然而,这似乎并没有帮助。而且每建一个环境,还是会破坏之前的掉落
关于如何让放置文件夹保留 node_modules 文件夹的任何想法?
感谢您的宝贵时间。
清理存储库时无法保留部分源代码。
为了加快 CI/CD,您不应启用 Clean 选项。
In general, for faster performance by your private agents, don't clean the repo. In this case to get the most performance advantage, make sure you are also building incrementally.
Source link : Clean the local repo on the agent
但是,如果是 option.Thus,您可以将 node_modules 文件夹签入源代码管理,它将在获取源代码步骤中检索。同时禁用 Repositoy 和 Build setp 的清理选项。
参考这篇文章:checking in node_modules