What is Jenkins Pipeline?
Jenkins Pipeline (or simply "Pipeline" with a capital "P") is a suite of plugins which supports implementing and integratingcontinuous delivery pipelinesinto Jenkins
Acontinuous delivery pipelineis an automated expression of your process for getting software from version control right through to your users and customers. Every change to your software (committed in source control) goes through a complex process on its way to being released. This process involves building the software in a reliable and repeatable manner,as well as the progression of the built software (called a "build") through multiple stages of testing and deployment.
Typically,the definition of a Jenkins Pipeline is written into a text file (called aJenkinsfile
) which in turn is checked into a project’s source control repository.[2]This is the foundation of "Pipeline-as-Code"; treating the continuous delivery pipeline a part of the application to be versioned and reviewed like any other code. Creating aJenkinsfile
provides a number of immediate benefits:
Automatically create Pipelines for all Branches and Pull Requests
Code review/iteration on the Pipeline
Audit trail for the Pipeline
Single source of truth[3]for the Pipeline,which can be viewed and edited by multiple members of the project.
Jenkins Pipeline | |
初试Jenkins2.0 Pipeline持续集成
Pipeline的几个基本概念:
Stage: 阶段,一个Pipeline可以划分为若干个Stage,每个Stage代表一组操作。注意,Stage是一个逻辑分组的概念,可以跨多个Node。
Node: 节点,一个Node就是一个Jenkins节点,或者是Master,或者是Agent,是执行Step的具体运行期环境。
Step: 步骤,Step是最基本的操作单元,小到创建一个目录,大到构建一个Docker镜像,由各类Jenkins Plugin提供。
,Jenkins 2.0的精髓是Pipeline as Code,是帮助Jenkins实现CI到CD转变的重要角色。什么是Pipeline,简单来说,就是一套运行于Jenkins上的工作流框架,将原本独立运行于单个或者多个节点的任务连接起来,实现单个任务难以完成的复杂发布流程。Pipeline的实现方式是一套Groovy DSL,任何发布流程都可以表述为一段Groovy脚本,并且Jenkins支持从代码库直接读取脚本,从而实现了Pipeline as Code的理念。
http://blog.csdn.net/aixiaoyang168/article/details/72818804
Jenkins 2.0
Jenkins 2.0新特性:Pipeline as code,全新的开箱体验和UI可用性提升以及完全向后兼容。
Pipeline as Code
通过使用Groovy DSL来描述一套运行于Jenkins上的工作流程,将原本独立运行于单个或者多个节点的任务连接起来,实现单个任务难以完成的复杂发布流程。并且,Jenkins支持从代码库直接读取脚本。全新的开箱体验和UI可用性提升
Jenkins 1.XXX 安装默认是开放所有权限,因为安全性存在隐患。而Jenkins 2.0则加强了安全管理。完全向后兼容
Jenkins官方公布是完全向后兼容的,所以在Jenkins 1.XXX版本的功能都可以使用,但插件还是得自己验证
这套持续交付的方案,最大的两个特性在于,一,使用了Jenkins Pipeline Project,通过Jenkinsfile脚本简化整个配置过程,增加了artifacts存储,加强了结果展示,UT结果看板以及stage时间统计。二,Dynamic slave,提供了动态生成slave,执行Jenkins job,销毁slave的能力。