Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick to 7.x: ci: set builds as skipped when they do not match the trigger (#19750) #19786

Merged
merged 1 commit into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .ci/apm-beats-update.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ pipeline {
when {
beforeAgent true
expression {
return isCommentTrigger() || isUserTrigger()
def ret = isCommentTrigger() || isUserTrigger()
if(!ret){
currentBuild.result = 'NOT_BUILT'
currentBuild.description = "The build has been skipped"
currentBuild.displayName = "#${BUILD_NUMBER}-(Skipped)"
echo("the build has been skipped due the trigger is a branch scan and the allow ones are manual, and GitHub comment")
}
return ret
}
}
/**
Expand Down
9 changes: 8 additions & 1 deletion .ci/packaging.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ pipeline {
when {
beforeAgent true
expression {
return isCommentTrigger() || isUserTrigger() || isUpstreamTrigger()
def ret = isCommentTrigger() || isUserTrigger() || isUpstreamTrigger()
if(!ret){
currentBuild.result = 'NOT_BUILT'
currentBuild.description = "The build has been skipped"
currentBuild.displayName = "#${BUILD_NUMBER}-(Skipped)"
echo("the build has been skipped due the trigger is a branch scan and the allow ones are manual, GitHub comment, and upstream job")
}
return ret
}
}
stages {
Expand Down