jenkinsfile: conditionally download toolchain
This commit is contained in:
1 parent
a985cfcf0d
commit
74a92f5df5
1 file changed
+12
Vendored
+12
@@ -32,10 +32,22 @@ pipeline {
|
||||
|
||||
stages {
|
||||
stage('Download GCC toolchain') {
|
||||
when {
|
||||
expression {
|
||||
def process = "${GCC_TARGET}-gcc".execute()
|
||||
|
||||
if process.exitValue() > 0 {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh "wget ${TOOLCHAIN_URL}"
|
||||
sh 'mkdir ' + GCC_TARGET + '-cross'
|
||||
sh 'tar -x -z -f ' + GCC_TARGET + '-cross.tgz'
|
||||
sh 'rm -vf ${GCC_TARGET}-cross.tgz'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user