further tweaking
This commit is contained in:
@@ -24,7 +24,7 @@ pipeline {
|
|||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
image 'mariadb:latest'
|
image 'mariadb:latest'
|
||||||
args "--volumes-from=jenkins -v /tmp/database_dump:/data/ --entrypoint=''"
|
args "--volumes-from=jenkins -v ${backdirectory}:/data/ --entrypoint=''"
|
||||||
reuseNode false
|
reuseNode false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,9 +39,9 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
withCredentials([string(credentialsId: 'cbce976a-0d98-4f35-8ea2-1f7818931bc3', variable: 'BORG_PASSPHRASE')]) {
|
withCredentials([string(credentialsId: 'cbce976a-0d98-4f35-8ea2-1f7818931bc3', variable: 'BORG_PASSPHRASE')]) {
|
||||||
sh "borg create --progress --stats ${env.borglocation}/nextcloud_database::${java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern('dd-MM-yyyy_HH:mm'))} /tmp/database_dump"
|
sh "borg create --progress --stats ${env.borglocation}/nextcloud_database::${java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern('dd-MM-yyyy_HH:mm'))} ${backdirectory}"
|
||||||
sh "borg prune --list --keep-daily 31 --keep-weekly 48 ${env.borglocation}/nextcloud_database"
|
sh "borg prune --list --keep-daily 31 --keep-weekly 48 ${env.borglocation}/nextcloud_database"
|
||||||
sh "rm -rf /tmp/database_dump"
|
sh "rm -rf ${backdirectory}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user