You can configure in the role-based matrix authorization the Azure Active Directory for the Jenkins slaves, that would be the best way to configure it. You can see this guide in order to get more context about how to do that.
Now, to change the startup command from the Jenkins slaves you will have to connect by ssh to the slave machine and manually change the startup command of Jenkins.
After you get inside the machine you will have to move to
/root/.nami/components/com.bitnami.jenkins-swarm. In that directory it's defined the logic of the installer of jenkins-swarm, which you can modify.
main.js file defines the method that is executed when you start/stop/restart jenkins-swam. There you can modify the start command to perform the operation you need.
Also, in the
/root/.nami/registry.json is defined all the variables that the
main.js file is using, so you can change the user/password for the ones you have configured with Active Directory.
In this case, I recommend you to change the parameters called
masterPassword of the
registry.json in order to set user/password you have created in Azure AD for the slaves of Jenkins
After executing those changes, you can execute
sudo nami stop/start/restart to stop/start/restart jenkins-swarm.
Note: It is highly recommended to stop jenkins-swarm and create a backup of the
main.js before performing any change.
I hope this information is useful for you.
Thank you and best regards,
Was my answer helpful? Click on