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" ...
随机推荐
- Java设计模式之行为型模式
行为型模式共11种:策略模式.模板方法模式.观察者模式.迭代子模式.责任链模式.命令模式.备忘录模式.状态模式.访问者模式.中介者模式.解释器模式. 策略模式:策略模式的决定权在用户,系统本身提供不同 ...
- 更改python的编码问题:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 56: ordinal not in range(128)
as3:/usr/local/lib/python2.7/site-packages# cat sitecustomize.py # encoding=utf8 import sys reload(s ...
- JS中修改属性
<!DOCTYPE html><html><head> <meta http-equiv="Content-Type" content=& ...
- jquery input change事件
input输入框的change事件,要在input失去焦点的时候才会触发 $('input[name=myInput]').change(function() { ... }); 在输入框内容变化的时 ...
- 【翻译】ASP.NET MVC 5属性路由(转)
转载链接:http://www.cnblogs.com/thestartdream/p/4246533.html 原文链接:http://blogs.msdn.com/b/webdev/archive ...
- Spring中文文档
前一段时间翻译了Jetty的一部分文档,感觉对阅读英文没有大的提高(*^-^*),毕竟Jetty的受众面还是比较小的,而且翻译过程中发现Jetty的文档写的不是很好,所以呢翻译的兴趣慢慢就不大了,只能 ...
- ubuntu SSH 连接、远程上传下载文件
安装 SSH(Secure Shell) 服务以提供远程管理服务 sudo apt-get install ssh SSH 远程登入 Ubuntu 机 ssh username@192.168.0.1 ...
- Swift中的一些关键字
以下关键字关于引用传参.属性.修改成员变量.静态变量.索引和构造函数重载 读过The Swift Programming Language的人都能看得出,我上面的这几个说法全不是apple的习惯用语. ...
- Linux 第06天
Linux 第06天 1.SAMBA服务器————(linux和windows的文件共享) 1.1 安装 yum install samba -yum 1.2 配置文件 /etc/samba/smb. ...
- handler内存泄露
原因: 在Activity中新建一个Handler后,Handler执行计时操作,如果Activity销毁,Handler是不会主动销毁的,而且会占用Activity的空间,不使其回收,积累久了就会内 ...