Jai*_*ela 2 git jenkins jenkins-pipeline
I'm working on a multibranch (A) job that is being triggered from another one (B). I want to do the deploy of my project only if there are changes in this project (A). By changes I mean from the last build of this job (I've seen the jenkins pannel gives you this info when you build, so I thought it would be possible to read it somewhere).
So, is there any way of checking it in a pipeline?
终于我找到了答案。如果您只想知道该版本中是否有更改,可以执行以下操作:
if(currentBuild.changeSets.size() > 0) {
//There are changes
}
else {
//No changes
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1020 次 |
最近记录: |