Skip to content

Instantly share code, notes, and snippets.

@ryanpadilha
Last active February 5, 2018 12:12
Show Gist options
  • Select an option

  • Save ryanpadilha/7cf286a14436b44df7ce14853effb690 to your computer and use it in GitHub Desktop.

Select an option

Save ryanpadilha/7cf286a14436b44df7ce14853effb690 to your computer and use it in GitHub Desktop.
Jenkins 2.73.2 instructions for execute backup from .zip files of Thinbackup plugin
#!/bin/bash
#
# Jenkins 2.73.2 instructions for execute backup from .zip files of Thinbackup plugin
# using git repository - https://github.com/ryanpadilha/jenkins-storage-backup
cd /opt/backup/jenkins
# global configuration for first use
git config --global user.email "ryan.padilha@gmail.com"
git config --global user.name "Ryan Padilha"
if [ -n "$(git status --porcelain)" ]; then
echo "there are changes";
git add *.zip
git commit -m 'first zip files'
git push -u origin master
else
echo "no changes";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment