![Jenkins 2.x实践指南](https://wfqqreader-1252317822.image.myqcloud.com/cover/830/25449830/b_25449830.jpg)
上QQ阅读APP看本书,新人免费读10天
设备和账号都新为新人
2.2 Jenkinsfile又是什么
Jenkinsfile就是一个文本文件,也就是部署流水线概念在Jenkins中的表现形式。像Dockerfile之于Docker。所有部署流水线的逻辑都写在Jenkinsfile中。
Jenkins默认是不支持Jenkinsfile的。我们需要安装pipeline插件,本书使用的插件版本为2.27,其安装方式和普通插件的安装方式无异。安装完成后,就可以创建pipeline项目了,如图2-1所示。
![](https://epubservercos.yuewen.com/29EDEB/13898202705417506/epubprivate/OEBPS/Images/21_1.jpg?sign=1738864715-t3ZtuLp7BIFp1npxhH8iOQ8mZg85k1lp-0-3f008429292d65e4b26450735b7cdd7e)
图2-1 创建pipeline项目