I am trying to hook in jenkins into my currently configured site.
My current site is located at
/var/www/aaronlote.com/checkout/ - jenkins is building into
If I update my vhost to point to
/var/lib/jenkins/workspace/aaronlote.com/ I get a 403 error, the directory is unreadable.
So I tried adding this as a build script in side the job:
rm -rf /var/www/aaronlote.com/checkout/ cp /var/lib/jenkins/workspace/aaronlote.com/ /var/www/aaronlote.com/checkout/
This runs but I have permission errors, e.g.
rm: cannot remove `/var/www/aaronlote.com/checkout/public/js/router.js': Permission denied rm: cannot remove `/var/www/aaronlote.com/checkout/public/js/main.js': Permission denied rm: cannot remove `/var/www/aaronlote.com/checkout/public/js/text.js': Permission denied
I then looked as using
sudo su inside the jobs build but got errors and didn't think it was a great idea having jenkins running super user commands.
Am I doing something obviously wrong or is there a way to get around this current set up issue I have?