博客园  :: 首页  :: 联系 :: 订阅 订阅  :: 管理

2013年4月19日

摘要: 看了一下源码,大致过程是:hudson.cli.CLI._main(String[] _args) hudson.cli.CliManagerImpl.main(List<String> args, Locale locale, InputStream stdin, OutputStream stdout, OutputStream stderr) hudson.cli.CLICommand.main(List<String> args, Locale locale, InputStream stdin, PrintStream stdout, PrintStream 阅读全文

posted @ 2013-04-19 16:02 Bruce Zhang 阅读(416) 评论(0) 推荐(0) 编辑

摘要: 通常,我们都是在Jenkins安装完成后,从系统提供的地址下载jenkins-cli.jar,用以运行CLI脚本:Step1: 下载完成后,发现jenkins-cli也是一个单独的maven模块: <modelVersion>4.0.0</modelVersion> <parent> <artifactId>pom</artifactId> <groupId>org.jenkins-ci.main</groupId> <version>1.510</version> </paren 阅读全文

posted @ 2013-04-19 15:00 Bruce Zhang 阅读(962) 评论(0) 推荐(0) 编辑

摘要: 官方文档参照:https://wiki.jenkins-ci.org/display/JENKINS/Writing+CLI+commandsPlugins can contribute additional commands toJenkins CLIwhich, since Jenkins 1.445, will also be available viaJenkins SSH.This is useful for (1) exposing administrative commands to admins, so that they can script some of the Jenk 阅读全文

posted @ 2013-04-19 14:42 Bruce Zhang 阅读(707) 评论(0) 推荐(0) 编辑

摘要: Jenkins在使用Role-Based Strategy进行权限管理时,存在一些默认的Group。记录如下:(1) anonymous: 匿名用户(2) authenticated: 登录用户 阅读全文

posted @ 2013-04-19 13:55 Bruce Zhang 阅读(388) 评论(0) 推荐(0) 编辑

摘要: 标题上说CRUD,其实不太准确。我的这个插件不关注Retrieve操作,所以只研究:Create Job, Update Job, Rename Job, Delete Job1. Create(创建JOB)Jenkins Job的创建有三种方式:通过Copy已有JOB创建通过CLI命令远程创建通过Jenkins创建Job页面填写相关配置信息来创建。这三种方式的实现在hudson.model.ItemGroupMixIn中实现,源码片段如下: /** * Copies an existing {@link TopLevelItem} to a new name. * ... 阅读全文

posted @ 2013-04-19 11:03 Bruce Zhang 阅读(924) 评论(0) 推荐(0) 编辑