From 452b88546e8f0f7fc0540008f860af92e3fb672a Mon Sep 17 00:00:00 2001 From: aeris Date: Tue, 24 Sep 2024 16:29:09 +0000 Subject: [PATCH] =?UTF-8?q?Expliciter=20les=20=C3=A9tapes=20parall=C3=A8le?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 109 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 94 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 13fb75b..a98a4f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,28 +13,107 @@ pipeline { stage('Filtrer les tags pour le routage') { steps { script { - sh 'osmium tags-filter france-latest.osm.pbf w/highway wa/public_transport=platform wa/railway=platform w/park_ride=yes r/type=restriction r/type=route -o france.osm.bz2 -f pbf,add_metadata=false' + sh 'osmium tags-filter france-latest.osm.pbf w/highway wa/public_transport=platform wa/railway=platform w/park_ride=yes r/type=restriction r/type=route -o france.osm.bz2 -f pbf,add_metadata=false -v' } } } - stage('Créer des extraits régionaux/départementaux') { - steps { - script { - // Trouve tous les fichiers GeoJSON dans le workspace - def geojsonFiles = findFiles(glob: '**/*.geojson') - def tasks = [] - - // Exécute osmium extract pour chaque fichier GeoJSON en parallèle - geojsonFiles.each { geojsonFile -> - tasks << { - def geojsonName = geojsonFile.name.replace('.geojson', '') - sh "osmium extract --strategy complete_ways --polygon=${geojsonFile.path} france.osm.bz2 -o ${geojsonName}.osm.bz2" + stage('Création des extractions départementales/régionales'){ + parallel { + stage('76') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=76.geojson france.osm.bz2 -o 76.osm.bz2" } } + } - // Exécute les tâches en parallèle - parallel tasks + stage('76-ext') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=76-ext.geojson france.osm.bz2 -o 76-ext.osm.bz2" + } + } + } + + stage('27.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=27.geojson france.osm.bz2 -o 27.osm.bz2" + } + } + } + + stage('27-ext.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=27-ext.geojson france.osm.bz2 -o 27-ext.osm.bz2" + } + } + } + + stage('50.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=50.geojson france.osm.bz2 -o 50.osm.bz2" + } + } + } + + stage('50-ext.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=50-ext.geojson france.osm.bz2 -o 50-ext.osm.bz2" + } + } + } + + stage('61.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=61.geojson france.osm.bz2 -o 61.osm.bz2" + } + } + } + + stage('61-ext.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=61-ext.geojson france.osm.bz2 -o 61-ext.osm.bz2" + } + } + } + + stage('14.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=14.geojson france.osm.bz2 -o 14.osm.bz2" + } + } + } + + stage('14-ext.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=14-ext.geojson france.osm.bz2 -o 14-ext.osm.bz2" + } + } + } + + stage('normandie.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=normandie.geojson france.osm.bz2 -o normandie.osm.bz2" + } + } + } + + stage('normandie-ext.geojson') { + steps { + script { + sh "osmium extract --strategy complete_ways --polygon=normandie-ext.geojson france.osm.bz2 -o normandie-ext.osm.bz2" + } + } } } }