Skip to content

Instantly share code, notes, and snippets.

@nicopaez
Created December 12, 2013 04:39
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 nicopaez/7923259 to your computer and use it in GitHub Desktop.
Save nicopaez/7923259 to your computer and use it in GitHub Desktop.
Jenkins Jobs backup script
$items = get-childitem jobs
foreach ($item in $items)
{
mkdir -Force "jobs_backup/jobs_config/$item/"
cp "jobs/$item/config.xml" "jobs_backup/jobs_config/$item/"
}
cd jobs_backup
svn add * --force
svn commit -m "Automated Jobs Backup"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment