Last active
June 18, 2019 14:20
-
-
Save gjabouley-invn/6b9d18cd6403f89ee8ca12fe1e532357 to your computer and use it in GitHub Desktop.
Jenkins filesystem fixes
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
# Jenkins symlinks becoming folders: https://support.cloudbees.com/hc/en-us/articles/216227047-After-moving-a-job-symlinks-for-folders-became-actual-folders | |
find $JENKINS_BUILDS_FOLDER -type d \( -name "last*Build" -o -name "lastStable" -o -name "lastSuccessful" \) -exec echo Directory: {} \; | |
find $JENKINS_BUILDS_FOLDER -type d \( -name "last*Build" -o -name "lastStable" -o -name "lastSuccessful" \) -exec mv {} {}.err \; | |
find $JENKINS_BUILDS_FOLDER -type d -name "*.err" -exec rm -rf {} \; | |
# Change ownership to bitnami of all folders being member of root group (not recursive) | |
find . -maxdepth 1 -group root -exec sudo chown -hR bitnami:bitnami {} \; | |
find . -maxdepth 1 -group root -exec sudo chown -hR jenkins:staff {} \; | |
# Batch rename/prefix | |
find eMD-Daily* -maxdepth 0 -exec mv {} OLD_{} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment