? Credentials and location of Docker Daemon (aka Docker Remote API) ? ToolInstallation for Docker CLI clients
? DockerImageExtractor extension point to get Docker image relations from
jobs
? Simple UI referring related image fingerprints in Docker builds
Docker Plugins,该插件是将Docker作为Jenkins的slave来使用,来在Docker容器种完成项目的build,build完成后该容器slave容器就会被销毁。所有的工作都是在slave容器内完成。
docker-build-step
该插件在 build 过程种增加了对 Docker 命令的支持。
Docker Pipeline Plugin,基于Docker Commons Plugin实现的一些上层的基于Docker的Pipeline编排。
Docker Hub Notification Trigger Plugin,该插件提供了当Registry中的image发生变化时触发build新镜像的功能。
11
CloudBees Docker Build and Publish,该插件提供了通过Dockerfile来构建项目并将生成的镜像上传到镜像仓库的功能。 CloudBees Docker Custom Build Environment,This plugin allows the definition of a build environment for a job using a Docker container。该插件适用于 “自由风格的软件项目”,如图: CloudBees Docker Traceability,用于追踪通过Jenkins启停的容器的事件。 12
Kubernetes, This plugin allows Jenkins agents to be dynamically provisioned on a Kubernetes cluster. The aim of the Kubernetes plugin is to be able to use a Kubernetes cluster to dynamically provision a Jenkins agent (using Kubernetes scheduling mechanisms to optimize the loads), run a single build, then tear-down that slave.
与Kubernetes结合,通过Kubernetes提供Jenkins的 slave 节点。利用Kubernetes的调度功能提供快速的启停 slave 节点执行 build 等任务。目前是0.11版本,稳定性有待验证。
Jenkins有没有API?
因为,我们不是直接在Jenkins的Dashbord来操作, 而是集成到现有平台,所以我们需要使用它的API。
Jenkins的Remote API以REST的形式进行提供。例如,我们搭建的Jenkins站点为http://myjenkins.com:8080。那么,访问http://myjenkins.com:8080/api 即可查看到该站点所有可用的API。
查询操作
13
执行一些动作 例如,我要创建一个 job,名字为 my_job,my_job的配置文件: 14
15
调用API创建 my_job:
curl -X POST http://www.xxx.xxx/jenkins/createItem?name=my_job --user uname:pass --data-binary \
然后,你就可以在Jenkins Dashboard上看到这个job了。它的管理页面为http://myjenkins.com:8080/job/my_job。那么我们访问 /my_job/api/ 即可查看到该job可用的API。
更多的API介绍可以参考Jenkins的官方wiki
(https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API),这里只是个引子,在此就不过多进行介绍。
16