I already have installed the jenkins charm. My question is how can I configure jenkins before deploy/after installation automatically? I want to authomatically, for example, install the github plugin and set the repository without the use of jenkins manager dashboard.
The jenkins charm externalizes config for a few different things... including plugins. You can see the current set of configurable bits, as well as their default values, on the config page.
You can set these at deploy-time:
juju deploy --config myjenkins.yaml jenkins myjenkins
where myjenkins.yaml has something like:
myjenkins: password: mypassword plugins-check-certificate: no plugins: greenballs javadoc
myjenkins service name has to match what you named the jenkins service when deploying with juju).
Alternatively, you can change things after you've deployed via something like:
juju set myjenkins plugins="greenballs"
The service should pick up the latest version of the plugin from the url specified in the
plugins-site config param... defaulting to updates.jenkins-ci.org.
Note that some plugins (like maven-plugin for example) are really part of jenkins core, so the plugin version has to match the jenkins version exactly. The latest plugin version that the charm pulls won't necessarily match the installed version of jenkins... which can cause problems. I got around this by specializing the jenkins charm to pull some core plugins with matching versions, but perhaps a better way would be to use a separate plugins-site with only a single version of the plugin.