Skip to content

Instantly share code, notes, and snippets.

@olivergondza
Created July 11, 2013 19:42
Show Gist options
  • Save olivergondza/5978582 to your computer and use it in GitHub Desktop.
Save olivergondza/5978582 to your computer and use it in GitHub Desktop.
Refresh FS based Jenkins update center
#!/bin/bash
if [ $# -ne 1 ]; then
echo "No update_center_id provided" >&2
echo "Usage: $0 <update_center_id>" >&2
exit 1
fi
rm -r /var/www/$1/*
/opt/apache-maven-3.0.5/bin/mvn -e exec:java -Dexec.args="\
-id $1\
-www /var/www/$1\
-download /var/www/$1/download\
-hpiDirectory /var/opt/update-center/$1/\
-repository http://localhost/$1\
-key /etc/pki/tls/private/update-center.key\
-certificate /etc/pki/tls/certs/update-center.crt\
-root-certificate /etc/pki/tls/certs/update-center.crt\
-includeSnapshots\
-pretty"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment