Reputation: 421
I am working on installing and configuring Jenkins automatically using the Jenkins CLI. I am able to install plugins such as the Active Directory
plugin, but haven't figured out how to configure it.
Is it possible to perform such tasks from the CLI?
From a Jenkins GUI standpoint, I'd like to check the Enable security checkbox
under Security Realm
check the Active Directory
option, provide parameters to Active Directory
, and under Authorization
check the Anyone can do anything
option.
I'm using a Puppet module (https://forge.puppetlabs.com/rtyler/jenkins) for the automation.
Greetings, Kenneth
Upvotes: 2
Views: 1427
Reputation: 89
There is currently a new Plugin in development called "Configuration as Code Plugin" to provide a way for configuration of plugins using YAML: https://github.com/jenkinsci/configuration-as-code-plugin/
They are currently in an early development stage but this could help solve this kind of problem.
Upvotes: 0
Reputation: 977
If you want to modify their configuration files manually using scripts called from the CLI, then yes.
Else, I don't believe there is. At least, not a general way for all plugins. Plugins are capable of adding CLI commands, as per this documentation page:
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI
Extending CLI
Plugins installed on Jenkins server can add custom CLI commands. See Writing CLI commands for more details.
So, some of the plugins you're using may have specific commands to configure them from the CLI.
So as far as I know those are your options. Manual configuration through editing their config files, or hoping your plugin includes some commands in the CLI that is specific to it.
Upvotes: 1