Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export Jenkins User Account and Security Settings?

I'm working with Jenkins servers in three different environments:Development-Staging-Production.

We work out the kinks in our Jenkins jobs in dev, test them in stage, and then finally move them to production. We do that be either replicating the job in the GUI (cut and paste) or tarring up the job directory and moving it to the next environment via the command line.

I'm wondering if the move option can be done with the service accounts that run these jobs. I can see the user account directories and config files under /var/lib/jenkins/users. What I don't see are the security settings that get applied to the user from the "Configure Global Security" screen in the GUI.

For these service accounts, we have the minimal authorization of READ on Global and READ and BUILD on Jobs.

What I'd like to be able to do is prove a service account in dev and then promote it to Stage and Prod from the command line vs having to manually recreate the account in the GUI for each upstream environment. If the API key could also be moved along with it that would be great.

Any thoughts or ideas?

like image 494
Michael J Avatar asked Dec 04 '25 01:12

Michael J


1 Answers

User permissions are in config.xml under the Jenkins root folder, in section <authorizationStrategy>

This file contains other global settings, so just copying it would not be advisable

like image 51
Slav Avatar answered Dec 05 '25 20:12

Slav



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!