Skip to content

Instantly share code, notes, and snippets.

Created Mar 2, 2016
What would you like to do?
JenkinsCIをyum updateすると、これのせいでworkdir以下のchownが時間掛かり過ぎる JENKINS_INSTALL_SKIP_CHOWNの変数で制御できるのかな今度試す
/sbin/chkconfig --add jenkins
# If we have an old hudson install, rename it to jenkins
if test -d /var/lib/hudson; then
# leave a marker to indicate this came from Hudson.
# could be useful down the road
# This also ensures that the .??* wildcard matches something
touch /var/lib/hudson/.moving-hudson
mv -f /var/lib/hudson/* /var/lib/hudson/.??* /var/lib/jenkins
rmdir /var/lib/hudson
find /var/lib/jenkins -user hudson -exec chown jenkins {} + || true
if test -d /var/run/hudson; then
mv -f /var/run/hudson/* /var/run/jenkins
rmdir /var/run/hudson
# Ensure the right ownership on files
. /etc/sysconfig/jenkins
if test x"$JENKINS_INSTALL_SKIP_CHOWN" != "xtrue"; then
chown -R ${JENKINS_USER:-jenkins} /var/cache/jenkins
chown -R ${JENKINS_USER:-jenkins} /var/log/jenkins
chown -R ${JENKINS_USER:-jenkins} ${JENKINS_HOME:-/var/lib/jenkins}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment