Some Jenkinsfile cleanup

This commit is contained in:
Joakim Erdfelt 2016-08-15 15:18:18 -07:00
parent 78544b999b
commit 36ac693385
1 changed files with 7 additions and 2 deletions

9
Jenkinsfile vendored
View File

@ -61,23 +61,28 @@ node('linux') {
}
}
// True if this build is part of the "active" branches
// for Jetty.
def isActiveBranch()
{
def branchName = "${env.BRANCH_NAME}"
return ( branchName == "master" ||
branchName.startsWith("jetty-") ||
branchName.startsWith("jenkins-") );
branchName.startsWith("jetty-") );
}
// Test if the Jenkins Pipeline or Step has marked the
// current build as unstable
def isUnstable()
{
return currentBuild.result == "UNSTABLE"
}
// Send a notification about the build status
def notifyBuild(String buildStatus)
{
if ( !isActiveBranch() )
{
// don't send notifications on transient branches
return
}