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