Added parameters for exclude list and added more printout

This commit is contained in:
2026-01-12 20:11:23 +01:00
parent 7ef17c5aff
commit 3916a4078a

View File

@@ -5,15 +5,19 @@ pipeline {
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: false, description: 'If true rsync the BORG repository to David') booleanParam(name: 'backuptodavid', defaultValue: false, description: 'If true rsync the BORG repository to David')
booleanParam(name: 'backuptopi', defaultValue: false, description: 'If true rsync the BORG repository to our ExternalPI') booleanParam(name: 'backuptopi', defaultValue: false, description: 'If true rsync the BORG repository to our ExternalPI')
string(name: 'directory', defaultValue: ' ', description: 'The directory that should be handled')
text(name: 'excludelist', defaultValue: '**/cache/** ', description: 'Multiline string to exclude patterns from backup')
} }
stages { stages {
stage('Run Information') { stage('Run Information') {
steps { steps {
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 External PI is ${params.backuptopi}" echo "Backup to External PI is ${params.backuptopi}"
echo "Excludelist: ${params.excludelist}" echo "Excludelist: ${params.excludelist}"
// Create a file with the exclude list within
sh "echo '${params.excludelist}' >> excludelist" sh "echo '${params.excludelist}' >> excludelist"
} }
} }