爱意满满的作品展示区。
thyrlian

AgileNotifier - 一个有趣的 CI 警报程序(可以用随机的句子骂破坏构建的提交代码者姓名)

  •  
  •   thyrlian · Feb 24, 2015 · 4109 views
    This topic created in 4126 days ago, the information mentioned may be changed or developed.
    https://github.com/thyrlian/AgileNotifier

    此工具已经在我公司Jenkins上运行超过1年多, 开发和市场的同事都觉得很好玩.

    目前支持Jenkins + Git + JIRA, 部署在Mac上(因为需要mac的TextToSpeech, 其实我的代码里有另外一套在线的方案实现TTS以支持其它平台, 不过由于在线服务是免费的, 使用起来不甚友好). 程序架构我是尽量设计得较容易扩展, 所以你也可以实现相关接口, 把Svn, 其它的CI工具支持进去.

    最终调用的代码是Ruby DSL, 超级简单易用.

    最后, 一旦李四提交代码, 造成构建失败, Mac里会有人说: 李四, 你xx的该被炒鱿鱼了!

    谢谢赏脸阅读.
    9 replies    2015-02-26 21:07:40 +08:00
    egen
        1
    egen  
       Feb 24, 2015
    23333
    Sharuru
        2
    Sharuru  
       Feb 24, 2015
    23333
    Sharuru
        3
    Sharuru  
       Feb 24, 2015
    233333
    thyrlian
        5
    thyrlian  
    OP
       Feb 24, 2015
    @yfdyh000 我脑量有限, 就想出这么几句 :(
    Sunnyyoung
        6
    Sunnyyoung  
       Feb 25, 2015
    哈哈,喜感
    c742435
        7
    c742435  
       Feb 25, 2015
    不想看代码,请问怎么知道错误代码的归属?
    thyrlian
        8
    thyrlian  
    OP
       Feb 26, 2015
    @c742435 这个是根据整个CI流程来定的.
    1. 先找到Jenkins上你关注Job的最新的一次Build;
    2. 再确定该Build是由哪一个Git Revision触发的 (得到Revision Hash);
    3. 根据Revision Hash从Git Repo上找到commiter name.

    前两步用的是Jenkins API, 最后一步是git command:
    git show #{revision} --pretty=format:%an | head -1
    c742435
        9
    c742435  
       Feb 26, 2015
    @thyrlian 哦哦哦哦……你们是每提交一次就build一次哈。我这里是手动build,每次build都会更新很多个版本。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4591 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 04:05 · PVG 12:05 · LAX 21:05 · JFK 00:05
    ♥ Do have faith in what you're doing.