【问题标题】:jenkins how to execute perticular command based on the keyword in the git commit message?jenkins 如何根据 git commit 消息中的键盘执行特定命令?
【发布时间】:2015-04-24 11:08:24
【问题描述】:

当我执行 git 提交时,在提交消息中我将指定 test class name 并且在 junkins 构建后步骤中我正在运行一个需要 class name 的 shell 命令(spoon) git commit 消息中的参数

我有 6 个测试类,具体取决于应该运行的提交消息特定命令。

示例提交消息:- git commit 'update [coreTest.java]'

运行命令

java -jar spoon-runner-1.1.9-jar-with-dependencies.jar \
--apk example-app.apk \
--test-apk example-tests.apk
--class-name  coreTest.java

coreTest.java是类名,应该根据提交信息放置。

【问题讨论】:

    标签: android jenkins jenkins-plugins git-commit spoon


    【解决方案1】:

    一个想法是在 git 服务器端有 post-receive 钩子,这将:

    【讨论】:

    • 谢谢 :) 我会试试这个。
    【解决方案2】:

    试试Parametrized plugin

    选择并传递你的类名作为参数

    【讨论】:

      猜你喜欢
      • 2015-06-13
      • 2014-04-14
      • 1970-01-01
      • 1970-01-01
      • 2014-12-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-12
      相关资源
      最近更新 更多