How to use groovy script on jenkins
1. Install groovy plugin
2. Add a step of groovy. (normal & systerm)
3. Execute groovy script
import jenkins.model.* def q = Jenkins.instance.queue q.items.findAll{ it.task.name.startsWith('ttt') }.each{ q.cancel(it.task) }
Above script is cancel all pending build in queue.
Additional info:
install groovy :
GVM (the GroovyenVironment Manager)
This tool makesinstalling Groovy on any Bash platform (Mac OSX, Linux, Cygwin, Solaris orFreeBSD) very easy.
Simply open a newterminal and enter:
$ curl -s get.gvmtool.net | bash
Follow theinstructions on-screen to complete installation.
Open a newterminal or type the command:
$ source "$HOME/.gvm/bin/gvm-init.sh"
Then install thelatest stable Groovy:
$ gvm install groovy
After installationis complete and you've made it your default version, test it with:
$ groovy -version
That's all thereis to it!
How to use groovy script on jenkins的更多相关文章
- SoapUI Pro Project Solution Collection –Easy develop Groovy Script to improve SoapUI ability
As you know the groovy script and java script language is the soapui supported .but unfortunately So ...
- Common tasks that you can perform with the Groovy Script test step
https://support.smartbear.com/readyapi/docs/soapui/steps/groovy.html Get test case object To obtain ...
- Access Java API in Groovy Script
$ cat Hello.java package test; public class Hello { public int myadd(int x, int y) { return 10 * x + ...
- Elasticsearch的Groovy Script自定义评分检索
需求:以索引中的boostapp列作为评分的基础分值,同时根据carpublishtime(数据的刷新时间字段)按时间进行衰减. 基于Groovy脚本实现. 1.query脚本方式: { " ...
- Groovy Script in SoapUI REST Testing
1. Run special step: testRunner.runTestStepByName("stepName/requestName") get it's respons ...
- [SoapUI] 通过Groovy Script获取当前运行的是哪套Environment
log.info testRunner.testCase.testSuite.project.getActiveEnvironment().getName()
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] Exception Handling in groovy
def x = new String[3] x[0] = "A" x[1] = "B" x[2] = "C" log.info"X ...
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] HashSet and Hashtable
Hashset: HashSet set = new HashSet() set.add("India") set.add("USA") set.add(&qu ...
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] Array and ArrayList
Array: def x = new String[5] x[0] = "India" x[1] = "USA" x[2] = "Korea" ...
随机推荐
- Markdown入门
http://www.jianshu.com/p/1e402922ee32/ 有道云笔记支持Markdown
- macbook air 开机黑屏解决方法
故障现象:1. 开机有声音2. 背面logo亮灯3. 键盘背光灯不亮4. 大写锁定键按下不亮5. 屏幕黑屏,无苹果logo 解决:重置PRAM后成功开机. 1. 关闭 Mac.2. 在键盘上找到以下按 ...
- DataTable select根据条件取值
1.封装独立方法 // 执行DataTable中的查询返回新的DataTable /// </summary> /// <param name="dt">源 ...
- Ubuntu下Sublime Text 3解决无法输入中文的方法
Ubuntu下Sublime Text 3解决无法输入中文的方法_百度经验http://jingyan.baidu.com/article/f3ad7d0ff8731609c3345b3b.html ...
- Win10 UI入门RelativePanel
<RelativePanel Background="Black" > <Rectangle x:Name=" RelativePanel.AlignH ...
- CodeTimerPerformance EasyPerformanceCounterHelper .NET 4.5
//#define NET35 namespace TestConsoleApplication { using System; using System.Diagnostics; using Sys ...
- 汽车遥控钥匙HCS101/HCS200/HCS201/HCS300芯片解密
汽车遥控钥匙芯片解密ic解密型号: HCS101 | HCS200 | HCS201 | HCS201T | HCS300 | HCS300T HCS301 | HCS301T | HCS360 | ...
- js文件上传
DOM: <form id="clueForm" class="insert-dialog" action="/xxx/xxx"met ...
- 分布式缓存技术redis学习系列(四)——redis高级应用(集群搭建、集群分区原理、集群操作)
本文是redis学习系列的第四篇,前面我们学习了redis的数据结构和一些高级特性,点击下面链接可回看 <详细讲解redis数据结构(内存模型)以及常用命令> <redis高级应用( ...
- DOM相关属性,方法,兼容性问题处理小析
DOM:Document Object Model文档对象模型,用于让程序(js)取操作页面中的元素.DOM节点类型有12种. (一)属性 一.子节点操作1.所有子节点(1)元素.childNodes ...