openstreetmap-data/Jenkinsfile

140 lines
4.7 KiB
Text
Raw Normal View History

2024-09-24 15:18:47 +00:00
pipeline {
agent any
2024-09-24 17:08:12 +00:00
options {
disableConcurrentBuilds()
}
2024-09-24 15:18:47 +00:00
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'
2024-09-24 15:18:47 +00:00
}
}
}
stage('Filtrer les tags pour le routage') {
steps {
script {
2024-09-24 16:43:14 +00:00
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'
2024-09-24 15:18:47 +00:00
}
}
}
2024-09-24 16:29:09 +00:00
stage('Création des extractions départementales/régionales'){
parallel {
stage('76') {
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=76.geojson france-filtered.osm.pbf -o 76.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
stage('76-ext') {
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=76-ext.geojson france-filtered.osm.pbf -o 76-ext.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
2024-09-24 16:50:57 +00:00
stage('27') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=27.geojson france-filtered.osm.pbf -o 27.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
2024-09-24 16:50:57 +00:00
stage('27-ext') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=27-ext.geojson france-filtered.osm.pbf -o 27-ext.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
2024-09-24 16:50:57 +00:00
stage('50') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=50.geojson france-filtered.osm.pbf -o 50.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
2024-09-24 16:50:57 +00:00
stage('50-ext') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=50-ext.geojson france-filtered.osm.pbf -o 50-ext.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
2024-09-24 16:50:57 +00:00
stage('61') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=61.geojson france-filtered.osm.pbf -o 61.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
2024-09-24 16:50:57 +00:00
stage('61-ext') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=61-ext.geojson france-filtered.osm.pbf -o 61-ext.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
2024-09-24 15:18:47 +00:00
2024-09-24 16:50:57 +00:00
stage('14') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=14.geojson france-filtered.osm.pbf -o 14.osm.bz2 -v"
2024-09-24 15:18:47 +00:00
}
}
2024-09-24 16:29:09 +00:00
}
2024-09-24 16:50:57 +00:00
stage('14-ext') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=14-ext.geojson france-filtered.osm.pbf -o 14-ext.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
2024-09-24 15:18:47 +00:00
2024-09-24 16:50:57 +00:00
stage('normandie') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=normandie.geojson france-filtered.osm.pbf -o normandie.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
}
2024-09-24 16:50:57 +00:00
stage('normandie-ext') {
2024-09-24 16:29:09 +00:00
steps {
script {
2024-09-24 16:43:14 +00:00
sh "osmium extract --strategy complete_ways --polygon=normandie-ext.geojson france-filtered.osm.pbf -o normandie-ext.osm.bz2 -v"
2024-09-24 16:29:09 +00:00
}
}
2024-09-24 15:18:47 +00:00
}
}
}
2024-09-24 15:38:41 +00:00
stage('Archivage des extraits') {
steps {
archiveArtifacts artifacts: '**/*.osm.bz2', fingerprint: true
}
}
2024-09-24 15:18:47 +00:00
}
post {
always {
2024-09-24 15:38:41 +00:00
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: true,
notFailBuild: true
)
2024-09-24 15:18:47 +00:00
}
}
}