nulIptr
V2EX  ›  问与答

看 Jenkins 每次都会执行 npm install,有没有简单的办法对比 package.json 的变更来决定要不要执行这个 stage 呢

  •  
  •   nulIptr · Nov 12, 2020 · 2675 views
    This topic created in 2189 days ago, the information mentioned may be changed or developed.
    4 replies  •  2020-11-13 15:01:41 +08:00
    FrancisZ
    FrancisZ
    Nov 12, 2020 via Android
    1
    除非你把 node_modules 上传,要不然怎么编译打包?
    h82258652
    h82258652
    Nov 12, 2020
    2
    yarn 可以解决。不过其实重新执行是有道理的,每次构建开始时都必须确保环境是干净的。
    Ariver
    Ariver
    Nov 12, 2020
    3
    你可以在 Jenkins 所在本地网络搞一个 repo
    julyclyde
    julyclyde
    Nov 13, 2020
    4
    可以搞一个服务于下载阶段的缓存
    但是 npm install 肯定是要执行的,要不然里面岂不是缺文件?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4136 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 09:01 · PVG 17:01 · LAX 01:01 · JFK 04:01
    ♥ Do have faith in what you're doing.