jenkinsfile: conditionally download toolchain

This commit is contained in:
Nils Andreas Svee committed 2022-11-27 15:10:24 +01:00
1 parent a985cfcf0d
commit 74a92f5df5
1 file changed
+12
Vendored
+12
View File
@@ -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'
}
}