diff --git a/Jenkinsfile b/Jenkinsfile index cb57e0a..b09afe2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { sh 'rm -rf /var/www/combi/assets /var/www/combi/data /var/www/combi/n' // Check if the tiles folder exists. If it does not, // extract the tiles - res = sh(script: "test -d /var/www/combi/tiles && echo '1' || echo '0' ", returnStdout: true).trim() + def res = sh(script: "test -d ${target_dir}", returnStatus: true) == 0 if (res == '0') { sh 'cp tiles.tar.gz /var/www/combi/' sh 'tar -xf /var/www/combi/tiles.tar.gz -C /var/www/combi'