Unverified Commit 5bfa8137 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] All overrun on master CI. (#5360)



* exclude_master

* fix

---------
Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent e41ce0c6
......@@ -240,12 +240,14 @@ pipeline {
stage('Abort Previous CI') {
steps {
script {
// https://www.jenkins.io/doc/pipeline/steps/pipeline-milestone-step/
// Note: incorrect "success" status might be shown for the old
// runs in the PR.
def buildNumber = env.BUILD_NUMBER as int
for (int i = 1; i <= buildNumber; i++) {
milestone(i)
if (env.BRANCH_NAME != "master") {
// Jenkins will abort an older build if a newer build already
// passed a higher milestone.
// https://www.jenkins.io/doc/pipeline/steps/pipeline-milestone-step/
def buildNumber = env.BUILD_NUMBER as int
for (int i = 1; i <= buildNumber; i++) {
milestone(i)
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment