removed paramteres

This commit is contained in:
matthias
2026-01-18 16:52:00 +01:00
parent ed5f6b571e
commit 4e07ca5c82

View File

@@ -5,19 +5,15 @@ pipeline {
booleanParam(name: 'backuptostackstorage', defaultValue: params.backuptostackstorage ?: false, description: 'If true backup data to TransIP Stack') booleanParam(name: 'backuptostackstorage', defaultValue: params.backuptostackstorage ?: 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: 'backuptopi', defaultValue: params.backuptopi ?: false, description: 'If true rsync the BORG repository to our ExternalPI') booleanParam(name: 'backuptopi', defaultValue: params.backuptopi ?: false, description: 'If true rsync the BORG repository to our ExternalPI')
string(name: 'directory', defaultValue: params.directory ?: ' ', description: 'The directory that should be handled')
text(name: 'excludelist', defaultValue: params.excludelist ?: '**/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}"
sh "echo '${params.excludelist}' >> excludelist"
} }
} }
stage('Run MariaDB') { stage('Run MariaDB') {
@@ -35,7 +31,7 @@ pipeline {
sh "yes | cp -rf /data/backup_latest.dmp /data/backup_yesterday.dmp 2>/dev/null || :" sh "yes | cp -rf /data/backup_latest.dmp /data/backup_yesterday.dmp 2>/dev/null || :"
sh "mariadb-dump -u nextcloud -h 10.10.1.32 --all-databases -ppassword -v > /data/backup_latest.dmp" sh "mariadb-dump -u nextcloud -h 10.10.1.32 --all-databases -ppassword -v > /data/backup_latest.dmp"
} else { } else {
echo "Local BORG backup creation is skipped" echo "Local backup creation is skipped"
} }
} }
} }
@@ -54,7 +50,7 @@ pipeline {
if (params.backuptostackstorage) { if (params.backuptostackstorage) {
sh "mkdir -p /config/rclone" sh "mkdir -p /config/rclone"
sh "cp ${WORKSPACE}/config/rclone.conf /config/rclone/" sh "cp ${WORKSPACE}/config/rclone.conf /config/rclone/"
sh "rclone copy -v /data/ stackstorage:/julien/nextcloud/database --exclude-from excludelist" sh "rclone copy -v /data/ stackstorage:/julien/nextcloud/database"
} else { } else {
echo "Backup to TransIP Stack is skipped" echo "Backup to TransIP Stack is skipped"
} }