V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
AlloVince
V2EX  ›  程序员

容器环境持续集成优化, Drone CI 提速 500%

  •  
  •   AlloVince ·
    AlloVince · May 6, 2019 · 3515 views
    This topic created in 2548 days ago, the information mentioned may be changed or developed.
    前文 /t/551430 分享了一些持续集成的基础

    这篇文章在此基础上分享一些优化和提速的方法

    https://avnpc.com/pages/speed-up-drone-ci-workflow
    8 replies    2019-05-07 11:11:30 +08:00
    cnbattle
        1
    cnbattle  
       May 6, 2019
    收藏了 之前弄过一次 挺简单的
    mritd
        2
    mritd  
       May 6, 2019 via iPhone
    正经企业复杂项目,多环境啥的还得 gitlab ci
    mritd
        3
    mritd  
       May 6, 2019 via iPhone
    Drone 看似简单,实际上太多东西不足,小项目自己要倒是个不错的选择
    iamkun
        4
    iamkun  
       May 6, 2019
    路过 收藏了
    Lpl
        5
    Lpl  
       May 6, 2019
    问题主要就是出在 cache 上了,增加下 yarn cache 或者 npm cache,然后挂载进来就能剩大量的网络时间;
    还有个问题,Docker-in-Docker 不需要 privileged: true 的权限,只需要把 socks 挂载进去就可以用了
    AlloVince
        6
    AlloVince  
    OP
       May 7, 2019
    @Lpl 如果是挂载的方式不需要 privileged,因为主机的 daemon 已经有足够权限, 但如果使用我说的在容器内启动 docker daemon 是需要 privileged 的
    AlloVince
        7
    AlloVince  
    OP
       May 7, 2019
    @mritd Gitlab CI 结合 Gitlab 才比较好用,集成 github 是付费功能,免费版缺失的功能也有点多,而付费又是按 per user per month 来付的,感觉不是很友好

    https://about.gitlab.com/pricing/self-managed/feature-comparison/

    如果偏保守的话,还是 Jenkins 吧
    mritd
        8
    mritd  
       May 7, 2019
    @AlloVince #7 如果是 github 开源项目就直接采用 travis-ci 了,如果是私有项目 那么只能 web hook 了...我们目前是 私有部署 gitlab,配合 gitlab ci,runner 容器驱动
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3739 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 04:30 · PVG 12:30 · LAX 21:30 · JFK 00:30
    ♥ Do have faith in what you're doing.