diff --git a/Jenkinsfile b/Jenkinsfile index 5366139..b5170a0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -138,6 +138,14 @@ def checkout() currentBuild.result = 'FAILURE' throw new Exception("Error checking out configs") } + script = 'test -f ' + config_path + device_conf + printDebug(script) + statusCode = sh label: 'check for config file', script: script, returnStatus: true + if(statusCode != 0) + { + currentBuild.result = 'FAILURE' + throw new Exception('Error: ' + device_conf + ' not found') + } script = 'git clone ' + git_link + ' ' + git_folder printDebug(script) statusCode = sh label: 'checkout_openwrt', script: script, returnStatus:true @@ -161,14 +169,6 @@ def pre_build() { stage('pre-build') { - script = 'test -f ' + config_path + device_conf + ' && echo true' - printDebug(script) - statusCode = sh label: 'check for config file', script: script, returnStatus: true - if(statusCode != 0) - { - currentBuild.result = 'FAILURE' - throw new Exception('Error: ' + device_conf + ' not found') - } script = 'cd ' + git_folder + '; patch -p1 < ../' + patch printDebug(script) statusCode = sh label: 'patch_sources', script: script, returnStatus:true