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

ci: set builds as skipped when they do not match the trigger #19750

Merged
merged 4 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from 3 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)"
cachedout marked this conversation as resolved.
Show resolved Hide resolved
kuisathaverat marked this conversation as resolved.
Show resolved Hide resolved
echo("they build has been skipped due the trigger is a branch scan and the allow ones are manual, and GitHub comment")
kuisathaverat marked this conversation as resolved.
Show resolved Hide resolved
}
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)"
kuisathaverat marked this conversation as resolved.
Show resolved Hide resolved
echo("they build has been skipped due the trigger is a branch scan and the allow ones are manual, GitHub comment, and upstream job")
kuisathaverat marked this conversation as resolved.
Show resolved Hide resolved
}
return ret
}
}
stages {
Expand Down