openstreetmap-data/Jenkinsfile
2024-09-24 18:50:57 +02:00

137 lines
4.7 KiB
Groovy

pipeline {
agent any
stages {
stage('Télécharger l\'export OSM de la France') {
steps {
script {
sh 'curl -L -o france-latest.osm.pbf http://download.openstreetmap.fr/extracts/europe/france-latest.osm.pbf'
}
}
}
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-filtered.osm.pbf -f pbf,add_metadata=false -v'
}
}
}
stage('Création des extractions départementales/régionales'){
parallel {
stage('76') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=76.geojson france-filtered.osm.pbf -o 76.osm.bz2 -v"
}
}
}
stage('76-ext') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=76-ext.geojson france-filtered.osm.pbf -o 76-ext.osm.bz2 -v"
}
}
}
stage('27') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=27.geojson france-filtered.osm.pbf -o 27.osm.bz2 -v"
}
}
}
stage('27-ext') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=27-ext.geojson france-filtered.osm.pbf -o 27-ext.osm.bz2 -v"
}
}
}
stage('50') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=50.geojson france-filtered.osm.pbf -o 50.osm.bz2 -v"
}
}
}
stage('50-ext') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=50-ext.geojson france-filtered.osm.pbf -o 50-ext.osm.bz2 -v"
}
}
}
stage('61') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=61.geojson france-filtered.osm.pbf -o 61.osm.bz2 -v"
}
}
}
stage('61-ext') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=61-ext.geojson france-filtered.osm.pbf -o 61-ext.osm.bz2 -v"
}
}
}
stage('14') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=14.geojson france-filtered.osm.pbf -o 14.osm.bz2 -v"
}
}
}
stage('14-ext') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=14-ext.geojson france-filtered.osm.pbf -o 14-ext.osm.bz2 -v"
}
}
}
stage('normandie') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=normandie.geojson france-filtered.osm.pbf -o normandie.osm.bz2 -v"
}
}
}
stage('normandie-ext') {
steps {
script {
sh "osmium extract --strategy complete_ways --polygon=normandie-ext.geojson france-filtered.osm.pbf -o normandie-ext.osm.bz2 -v"
}
}
}
}
}
stage('Archivage des extraits') {
steps {
archiveArtifacts artifacts: '**/*.osm.bz2', fingerprint: true
}
}
}
post {
always {
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: true,
notFailBuild: true
)
}
}
}