pipeline语法:https://www.jenkins.io/zh/doc/book/pipeline/syntax/

序号

pipeline 命令或者config中的名称

插件名称

插件说明链接

1

findFiles()

Pipeline Utility Steps

https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/

2

cleanWs()

Workspace Cleanup Plugin

清理workspace

3

MultiJob Phase

Multijob

mutijob中使用到

4

Prepare an environment for the run

EnvInject Plugin

设置环境变量

5

manager.addShortText(manager.getEnvVariable('ipr_version') , "red", "yellow", "0px", "white")

Groovy Postbuild Plugin

添加标签等

6

conditional steps(mutiple)

Conditional BuildStep | Jenkins plugin

类似mutijob

7

BUILD_USER

user build vars

获取用户名的插件

8

groovy postbuild

Groovy Postbuild

manager.addShortText(manager.getEnvVariable('service_version') , "red", "yellow", "0px", "white")

9

rebuild

Rebuilder

10

wrap([$class: 'BuildUser'])

user build vars

wrap([$class: 'BuildUser']),获取构建人信息

wrap([$class: 'BuildUser']) {
script {
name = "${env.BUILD_USER}"
}
}

11

Failure Cause Management

Build Failure Analyzer

Build Failure Analyzer | Jenkins plugin

日志分析工具

Failure Cause Management (配置错误日志分析规则,正则表达式)

Identified Problems (根据规则识别已知问题)

Indication (定位并高亮显示错误日志)

12

Extended E-mail Notification

Email Extension Plugin

用于发送邮件

13

BUILD_TIMESTAMP变量

Build Timestamp Plugin

获取时间,使得job log的每次输出前面都增加当时的时间,方便查找job里脚本语句运行的间隔时间,方便查找问题。

14

copy artifacts from another project

  Copy Artifact Plugin

15

extended-choice-parameter

可以通过json配置参数,设置多选框

16

Warnings Next Generation Plugin(publishIssues)

问题数量趋势图

17

Active Directory

Active Directory plugin

用来配置启用ActiveDirectory认证,LDAP和AD的关系 LDAP和Active Directory有什么区别? - 风君子博客 - 博客园

18

Folder Authorization Strategy

Folder-based Authorization Strategy

用来对目录进行权限控制

19恢复删除的jobjob config history恢复删除的job
20Set Next Build Number

Next Build Number | Jenkins plugin

设置build number
21

ThinBackup

ThinBackup

Jenkins 备份和恢复
22

Embeddable Build Status Plugin

可以在外部网站上显示Jenkins job的状态
23milestone()

Pipeline: Milestone Step - Jenkins

可以abort其他正在运行的job
24options
{
timeout(time: 600, unit: 'MINUTES')
timestamps ()
}

Timestamper | Jenkins plugin

log中显示时间戳
25Multibranch Pipeline待学习
26Throttle Concurrent Builds设置最大并发数
27https://github.com/jenkinsci/pipeline-stage-view-plugin/blob/master/rest-api/README.md获取pipeline stage 的状态

初始化Jenkins官方推荐插件

Folders ,

OWASP Markup Formatter,

Build Timeout,

Credentials Binding,

Timestamper,

Workspace Cleanup,

Ant ,

Gradle ,

Pipeline,

GitHub Organization Folder,

Pipeline: Stage View,

Git,

Subversion ,

SSH Slaves ,

Matrix Authorization Strategy,

PAM Authentication,

LDAP,

Email Extension ,

Mailer

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐