forked from Hg/htlle-da-vorlage
handle yaml comments in context of build-notification
This commit is contained in:
parent
9439c6c1d6
commit
be7b2c48d4
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -103,8 +103,14 @@ pipeline {
|
||||
// get mail addresses
|
||||
metadata = readFile(file: "${env.GIT_PATH}metadata.yaml").split('\n').each { line ->
|
||||
if(line.contains("- build-notification:")) {
|
||||
// remove yaml comments
|
||||
if(line.contains('#')) {
|
||||
line = line.substring(0, line.indexOf('#'))
|
||||
}
|
||||
def mailMatch = line =~ /[_A-Za-z0-9-]+(.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(.[A-Za-z0-9]+)*(.[A-Za-z]{2,})/
|
||||
env.RECIPIENTS += (mailMatch[0][0] + ";")
|
||||
if(mailMatch) {
|
||||
env.RECIPIENTS += (mailMatch[0][0] + ";")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user