I have gotten Jenkins up and running, which is kind of fun. It can run in tomcat which is convenient since I have already set that up, and I’ve already dealt with the permissions of tomcat publishing stuff to html directories. For anyone who is curious, I did that by creating a www-tomcat group and making the tomcat and www-data users members of it.
I found that the “pipeline” option in Jenkins was much easier to get going with than creating a freestyle project. The one thing I got hung up on was this error when trying to copy stuff out of the workspace:
cp: cannot create regular file '/path/to/filename': Read-only file system
That’s kind of frustrating, because I know it’s not a read-only file system! Thanks to this fellow, I discovered that tomcat is put in a ‘Sandbox’ so it can’t write anywhere except for log files and such. Good news, this is solvable! Unfortunately the proposed solution didn’t work for me; there was no /etc/systemd/system/tomcat9.service.d/
directory, and when I created one, it was ignored.
With a little detective work of my own I discovered that there is a file at /lib/systemd/system/tomcat9.service
that contains a bunch of ReadWritePaths
directives, so why not just add mine there? And voila, it works.
So now all I have to do is write the rest of my ledger program! But at least I will not be spending time copying files around.