Skip to content

Instantly share code, notes, and snippets.

@GeorgDangl
Last active June 14, 2020 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GeorgDangl/aa7b522d0d889e99cd45e77448b04a6e to your computer and use it in GitHub Desktop.
Save GeorgDangl/aa7b522d0d889e99cd45e77448b04a6e to your computer and use it in GitHub Desktop.
Simple and Quick Way to Backup Jenkins to Azure Blob Storage, see https://blog.dangl.me/archive/simple-and-quick-way-to-backup-jenkins-to-azure-blob-storage/
pipeline {
triggers {
cron('0 0 1 * *')
}
agent {
node {
label 'master'
customWorkspace 'workspace/JenkinsBackup'
}
}
environment {
BlobStorageConnectionString = credentials('JenkinsAzureBackupBlobStorageConnectionString')
}
stages {
stage ('Backup') {
steps {
powershell './build.ps1 BackupInstance'
}
}
}
post {
always {
step([$class: 'Mailer',
notifyEveryUnstableBuild: true,
recipients: "georg@dangl.me",
sendToIndividuals: true])
cleanWs()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment