木吟

导航

Jenkins job type: Multi-configuration project

很多时候我们要copy n个Jenkins job去run automation project, 只因为想同时跑几种不同的parameter choice. 创建一个Multi-configuration project的Jenkins job就可以解决这个问题。 

具体操作如下:

  1. new item -> select "Multi-configuration project".
  2. configurate the parent job salve server label in Adanced Project Options.
  3. add "User-defined Axis" to Configuration Matrix, 把需要并发跑的parameter choice配在这里.
  4. add "Slaves" to Configuration Matrix, 点开“Labels”选项,选择salve server label.
  5. set Trigger for matrix projects to "Trigger for each configuration", default value is "Trigger only the parent job".
  6. 其他配置跟之前project一样配就可以了.
  7. 最后run job后,会看到你设置的parameter choice对应的sub jobs都在并发run,跑完后,会收到每个sub job自己的那份automation report email. 

 

   

  

 

补充:

默认parameter choice是并发模式跑的,但如果想一个跑完接着一个跑,就勾选“Run each configuration sequentially” under Excecution Strategy。

posted on 2019-09-17 15:47  木吟  阅读(677)  评论(0编辑  收藏  举报