Just a place for links to getting Jenkins working for CICD for my projects.
You can jump past the Docker setup if you already did the above by scrolling down to Fork and clone the sample repository. Also ignore docker stuff in project setup.
I can't seem to login to Jenkins after restart.
sed -i 's/<useSecurity>true<\/useSecurity>/<useSecurity>false<\/useSecurity>/g' /var/lib/jenkins/config.xml
but that assumes you set up with a local DB instead of the linux users. If you make the change and are using the local auth Jenkins will not even start. Worse yet, it fails quietly wasting even more time digging uselessly to try and find an error to solve. Here is the rub. In order to use the local auth system the user Jenkins runs at needs to be able to read /etc/shadow which means running root or hacking perms. So despite using the local users making the most sense logistically, it makes little sense security wise so you want to switch to something else but first you need to get in. The way that works is to set the password for the user you are running Jenkins as.
Now you can login with that user and password and change the Security Realm in Configure Global Security to something else. Jenkins’ own user database makes the most sense for me.
|Jenkins Configure Global Security page
Info on options can be found here.
To be closer to my work setup I made it a bit fancier.
|Project-based Matrix Authorization Strategy example