diff --git a/jobs/jenkins-master/templates/bin/pre-start.erb b/jobs/jenkins-master/templates/bin/pre-start.erb index 7597a9e..1837c79 100644 --- a/jobs/jenkins-master/templates/bin/pre-start.erb +++ b/jobs/jenkins-master/templates/bin/pre-start.erb @@ -22,7 +22,9 @@ if [[ $(ls /var/vcap/jobs/jenkins-master/init.groovy.d/*.groovy) ]]; then fi if [ ${JENKINS_USE_GITHUB_AUTH} == "true" ]; then - rm /var/vcap/store/jenkins-master/init.d/configure-access.groovy + if [ -f /var/vcap/store/jenkins-master/init.d/configure-access.groovy ]; then + rm /var/vcap/store/jenkins-master/init.d/configure-access.groovy + fi cp /var/vcap/jobs/jenkins-master/init.groovy.d/configure-github-access.groovy /var/vcap/store/jenkins-master/init.groovy.d/configure-github-access.groovy fi