Last active
June 14, 2020 15:20
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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