4 ms·
We keep Jenkins job config/logs in a git repository which is checked out into /var/lib/jenkins. When we want to add a plugin or whatever we just add it to the
by nineteen999 8y ago
We keep Jenkins job config/logs in a git repository which is checked out into /var/lib/jenkins.
When we want to add a plugin or whatever we just add it to the plugins repos, git add/commit the repository and re-kickstart the Jenkins VM.
The Jenkins kickstart then just restore the previous git config/logs back into /var/lib/jenkins. Everything comes back as it was, but the new/upgraded plugins are available.
Easy peasy. But then again we don't have a huge number of jenkins jobs or a massive cluster of Jenkins masters/slaves so yeah.
You could feasibly do it without re-kickstarting the machine, but we like to show off how the Jenkins server can rebuild itself with a self-hosted Jenkins job.