当前位置:网站首页>Pipeline post instruction
Pipeline post instruction
2022-06-24 12:24:00 【Chen Bucheng I】
One . Introduce
post The steps are included throughout pipeline Or some additional steps after the phase is completed .post The steps are optional , So it is not included in the declarative pipeline In the simplest structure , But that doesn't mean it doesn't work very well .
Usually used for exception handling , If the last stage fails , Then do some operations . For example, cleaning up dependent packages in the previous stage , After judging that the cleanup failed , Send email to alarm and exit .
Two . Parameter description
Parameter position : pipeline or steps part , According to the completion status , use sb.'s judgement .
Specific parameters :
- always: No matter what the current completion status is , All implemented
- changed: Execute as long as the current completion state is different from the last one
- fixed: The last completion state was failed or unstable (unstable), Execute when the current completion status is success
- regression: The last completion status is success , The current completion status is failed 、 Unstable or suspended (aborted) When the
- aborted: When the current execution result is aborted ( Generally, it is artificially suspended ) perform
- failure: Execute when the current completion status is failed
- success: Execute when the current completion status is success
- unstable: Execute when the current completion state is unstable
- cleanup: Clean up the condition block . No matter what the current completion status is , After all other condition blocks are executed .post A section can contain multiple conditional blocks at the same time . Here are post A complete example of the section
Be careful :
- post Step in phase , by steps Later description
- post Every step of judgment , Will match , Instead of the first match , Others skip
3、 ... and . Using examples
Write a simple example :
pipeline {agent anystages {stage('test'){steps {echo 'test'}post {always {echo "post condition executed: always ..."}changed {echo "post condition executed: changed ..."}aborted {echo "post condition executed: aborted ..."}}}}}
When writing the article , Added regression Judgment of options , However, the following error is reported by the execution , Show the current pipeline The plug-in does not support this option , So in the above example, we have removed .
Re execution , You can see the display 2 Outputs ,always Each time, it will display , Because I failed last time , This time steps Of echo Successful implementation , It shows changed.
边栏推荐
- Google Earth engine (GEE) - how to add a legend in the map panel
- How stupid of me to hire a bunch of programmers who can only "Google"!
- 11+文章-机器学习打造ProTICS框架-深度揭示了不同分子亚型中肿瘤浸润免疫细胞对预后的影响
- I'm in Shenzhen. Where can I open an account? Is it safe to open an account online now?
- Is GF Securities reliable? Is it safe to open a securities account?
- 数据标注科普:十种常见的图像标注方法
- Opencv learning notes - matrix normalization normalize() function
- Basic path test of software test on the function of the previous day
- Single gene pan cancer + simple experiment can be published 7 points+
- 5 points + single gene pan cancer pure Shengxin idea!
猜你喜欢

Opencv learning notes -- Separation of color channels and multi-channel mixing
Cloud native database: the outlet of the database, you can also take off

QT -- the qtabwidget supports dragging tabbar items

《梦华录》要大结局了,看超前点映不如先来学学它!

美团基于 Flink 的实时数仓平台建设新进展

GLOG from getting started to getting started

FreeRTOS overview and experience

GTEST from getting started to getting started
![[go language questions] go from 0 to entry 4: advanced usage of slice, elementary review and introduction to map](/img/7a/16b481753d7d57f50dc8787eec8a1a.png)
[go language questions] go from 0 to entry 4: advanced usage of slice, elementary review and introduction to map

GTest从入门到入门
随机推荐
《opencv学习笔记》-- 分离颜色通道、多通道混合
Which commercial insurance endowment insurance is good? Ranking of commercial endowment insurance products in 2022
The idea of "6 points + gene family" without experiment~
打新债可以申请多少 开户是安全的吗
美团基于 Flink 的实时数仓平台建设新进展
《opencv学习笔记》-- 离散傅里叶变换
可变参数模板实现max(接受多个参数,两种实现方式)
Opencv learning notes - Discrete Fourier transform
Kubernetes best practice: graceful termination
ahk实现闹钟
最新热点:使用铜死亡相关基因进行肿瘤预后分型!
怎样打新债具体操作 开户是安全的吗
Chenglixin research group of Shenzhen People's hospital proposed a new method of multi group data in the diagnosis and prognosis analysis of hepatocellular carcinoma megps
2021-06-03: Boolean operation. Given a Boolean expression and an expected cloth
How to make Baidu quickly include its own personal website?
11+! 结肠癌中基于 m6A 调节因子的甲基化修饰模式以不同的肿瘤微环境免疫谱为特征
怎么申请打新债 开户是安全的吗
怎么可以打新债 开户是安全的吗
Axi low power interface
mRNA疫苗的研制怎么做?27+ 胰腺癌抗原和免疫亚型的解析来告诉你答案!