From 991a369694a029a79ab2e3b07aaceb90995f48ac Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Tue, 30 Aug 2016 10:28:13 -0400 Subject: [PATCH] Adding standard helpers --- Jenkinsfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 94afbd0..a497a63 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -63,6 +63,16 @@ node { } } +def maintainer() { + def matcher = readFile('common.bash') =~ 'maintainer="(.+)"' + matcher ? matcher[0][1] : 'tier' +} + +def imagename() { + def matcher = readFile('common.bash') =~ 'imagename="(.+)"' + matcher ? matcher[0][1] : null +} + def handleError(String message){ echo "${message}" currentBuild.setResult("FAILED")