This commit is contained in:
matthias
2026-05-04 15:02:29 +02:00
parent 80c98513a7
commit 5163fdbb55
+6 -3
View File
@@ -2,7 +2,7 @@ pipeline {
agent any agent any
parameters { parameters {
booleanParam(name: 'backuplocally', defaultValue: params.backuplocally ?: false, description: 'If true local BORG backup will be created') booleanParam(name: 'backuplocally', defaultValue: params.backuplocally ?: false, description: 'If true local BORG backup will be created')
booleanParam(name: 'backuptostackstorage', defaultValue: false, description: 'If true backup data to TransIP Stack') // booleanParam(name: 'backuptostackstorage', defaultValue: false, description: 'If true backup data to TransIP Stack')
booleanParam(name: 'backuptodavid', defaultValue: params.backuptodavid ?: false, description: 'If true rsync the BORG repository to David') booleanParam(name: 'backuptodavid', defaultValue: params.backuptodavid ?: false, description: 'If true rsync the BORG repository to David')
booleanParam(name: 'backuptowinschoten', defaultValue: params.backuptowinschoten ?: false, description: 'If true rsync the BORG repository to our Winschoten backup system') booleanParam(name: 'backuptowinschoten', defaultValue: params.backuptowinschoten ?: false, description: 'If true rsync the BORG repository to our Winschoten backup system')
string(name: 'directory', defaultValue: params.directory ?: ' ', description: 'The directory that should be handled') string(name: 'directory', defaultValue: params.directory ?: ' ', description: 'The directory that should be handled')
@@ -17,7 +17,7 @@ pipeline {
script { env.backuptostackstorage = false } script { env.backuptostackstorage = false }
echo "Backing up directory ${env.storagelocation}/${directory}" echo "Backing up directory ${env.storagelocation}/${directory}"
echo "Local BORG backup creation is ${params.backuplocally}" echo "Local BORG backup creation is ${params.backuplocally}"
echo "Backup to TransIP Stack is ${params.backuptostackstorage}" // echo "Backup to TransIP Stack is ${params.backuptostackstorage}"
echo "Backup to David is ${params.backuptodavid}" echo "Backup to David is ${params.backuptodavid}"
echo "Backup to Winschoten PI is ${params.backuptowinschoten}" echo "Backup to Winschoten PI is ${params.backuptowinschoten}"
sh "echo '${params.excludelist}' >> excludelist" sh "echo '${params.excludelist}' >> excludelist"
@@ -67,6 +67,8 @@ pipeline {
// } // }
stage('Rsync TEST') { stage('Rsync TEST') {
failFast false
parallel {
steps { steps {
script { script {
if (params.backuptodavid) { if (params.backuptodavid) {
@@ -82,7 +84,8 @@ pipeline {
sh "rsync -v -a -e 'ssh -i /home/backupwinschoten/.ssh/id_rsa -p 9897' --delete --info=progress2 ${env.borglocation}/${directory} backupwinschoten@localhost:/storage/borgbackups/" sh "rsync -v -a -e 'ssh -i /home/backupwinschoten/.ssh/id_rsa -p 9897' --delete --info=progress2 ${env.borglocation}/${directory} backupwinschoten@localhost:/storage/borgbackups/"
} }
} else { } else {
echo "Backup to External PI is skipped" echo "Backup to Winschoten is skipped"
}
} }
} }
} }