moved check for config file before cloning of owrt repo
This commit is contained in:
parent
bbf370cca5
commit
c03c3819be
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -138,6 +138,14 @@ def checkout()
|
|||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
throw new Exception("Error checking out configs")
|
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
|
script = 'git clone ' + git_link + ' ' + git_folder
|
||||||
printDebug(script)
|
printDebug(script)
|
||||||
statusCode = sh label: 'checkout_openwrt', script: script, returnStatus:true
|
statusCode = sh label: 'checkout_openwrt', script: script, returnStatus:true
|
||||||
@ -161,14 +169,6 @@ def pre_build()
|
|||||||
{
|
{
|
||||||
stage('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
|
script = 'cd ' + git_folder + '; patch -p1 < ../' + patch
|
||||||
printDebug(script)
|
printDebug(script)
|
||||||
statusCode = sh label: 'patch_sources', script: script, returnStatus:true
|
statusCode = sh label: 'patch_sources', script: script, returnStatus:true
|
||||||
|
Loading…
Reference in New Issue
Block a user