美文网首页
Jenkins源码分析

Jenkins源码分析

作者: LinuxSuRen | 来源:发表于2017-11-25 19:28 被阅读0次
  • 介绍

本文基于版本2.80来进行分析。

包含4个工程:cli、jenkins-core、jenkins-war、test。

  • core

jenkins-core是jenkins的核心工程,包含hudson、jenkins两个主要的顶级包(package)。

hudson.WebAppMain为web程序的入口。该类实现了接口ServletContextListener,并在初始化方法中启动了一个初始化线程。

  • model

hudson.model.Computer

hudson.model.ComputerSet是用来管理节点列表的Web接口类

  • 插件

PluginManager

  • 扩展点

hudson.ExtensionPoint该接口用于标识一个扩展,并没有规定任何方法。

  • 监听器

抽象类hudson.slaves.ComputerListener用于通知计算节点(Computer)的状态变化。

接口hudson.model.TaskListener

  • 页面

jenkins-core/src/main/resources/hudson/slaves/DumbSlave/configure-entries.jelly新增节点页面

hudson/tools/ToolLocationNodeProperty/config.jelly工具配置页面

  • 前端组件

https://yuilibrary.com/yui/docs/yui/

  • 构建

mvn package -Dmaven.test.skip=true

https://wiki.jenkins.io/display/JENKINS/Building+Jenkins

  • 调试

mvnDebug jenkins-dev:run

mvnDebug jenkins-dev:run -Dport=9090

  • API

http://localhost:8080/createItem?mode=copy&from=ItemName&name=ItemNameStr

http://localhost:8080/computer/api/json?pretty=true

http://localhost:8080/computer/createItem/api/json?pretty=true&name=sd11f&mode=copy&from=111

http://localhost:9090/job/test-pipeline/13/pause/toggle

http://localhost:9090/job/test-pipeline/16/replay/run

mode-hudson.slaves.DumbSlave

  • 参考

本文为原创,如果您当前访问的域名不是surenpi.com,请访问“素人派”。

相关文章

网友评论

      本文标题:Jenkins源码分析

      本文链接:https://www.haomeiwen.com/subject/lmocbxtx.html