fixed config file check

This commit is contained in:
psycho 2021-02-09 11:35:02 +01:00
parent 4f8357eaf5
commit 4dd5dfa73e

8
Jenkinsfile vendored
View File

@ -156,15 +156,15 @@ def checkout()
} }
} }
} }
***REMOVED***
def pre_build() def pre_build()
{ {
stage('pre-build') stage('pre-build')
{ {
script = 'test -f ' + config_path + '/' + device_conf + ' && echo true' script = 'test -f ' + config_path + device_conf + ' && echo true'
printDebug(script) printDebug(script)
stdout = sh label: 'check for config file', script: script, returnStdout: true statusCode = sh label: 'check for config file', script: script, returnStatus: true
if(!stdout.trim().equalsIgnoreCase('true')) if(statusCode != 0)
{ {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
throw new Exception('Error: ' + device_conf + ' not found') throw new Exception('Error: ' + device_conf + ' not found')