fixed config file check
This commit is contained in:
parent
4f8357eaf5
commit
4dd5dfa73e
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -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')
|
||||||
|
Loading…
Reference in New Issue
Block a user