137 lines
4.6 KiB
Groovy
137 lines
4.6 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.osm.bz2 -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.osm.bz2 -o 76.osm.bz2"
|
|
}
|
|
}
|
|
}
|
|
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Archivage des extraits') {
|
|
steps {
|
|
archiveArtifacts artifacts: '**/*.osm.bz2', fingerprint: true
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
cleanWs(cleanWhenNotBuilt: false,
|
|
deleteDirs: true,
|
|
notFailBuild: true
|
|
)
|
|
}
|
|
}
|
|
}
|