Howdy all,
I am really stumped here. I've got an Ansible role that installs and configures Jenkins using the Debian packages:
https://github.com/karlmdavis/ansible-role-jenkins2. It uses the
-Djenkins.install.runSetupWizard=false flag, and handles the first-time setup itself.
In my tests using that role, it seems that Jenkins is ending up with this weird
config.xml:
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
<disabledAdministrativeMonitors/>
<version>1.0</version>
<numExecutors>2</numExecutors>
<mode>NORMAL</mode>
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.AuthorizationStrategy$Unsecured"/>
<securityRealm class="hudson.security.SecurityRealm$None"/>
<disableRememberMe>false</disableRememberMe>
<projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/>
<workspaceDir>${JENKINS_HOME}/workspace/${ITEM_FULLNAME}</workspaceDir>
<buildsDir>${ITEM_ROOTDIR}/builds</buildsDir>
<jdks/>
<viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
<myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
<clouds/>
<scmCheckoutRetryCount>0</scmCheckoutRetryCount>
<views>
<hudson.model.AllView>
<owner class="hudson" reference="../../.."/>
<name>all</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
</hudson.model.AllView>
</views>
<primaryView>all</primaryView>
<slaveAgentPort>0</slaveAgentPort>
<label></label>
<nodeProperties/>
<globalNodeProperties/>
</hudson>That... doesn't seem right? Shouldn't a clean install of Jenkins end up configured to use
hudson.security.HudsonPrivateSecurityRealm? And also, what's up with the
<version>1.0</version> in there?
Just to make this even more confusing, when I'm running this role in a different environment (but also a clean install) the
config.xml has
hudson.security.HudsonPrivateSecurityRealm and -- sometimes (?!) -- ends up with
<version>2.whatever</version>.
I'm really confused as to 1) what a clean install's configuration is supposed to be, and 2) why I'm getting different results intermittently. Does anyone have any clues?
Thanks much,
Karl M. Davis
P.S. The two environments that I'm seeing different behavior in are 1) a custom Ubuntu 16.04 Docker container, and 2) an Ubuntu 16.04 EC2 VM. I wouldn't expect there to be any default config.xml differences between those two, but what do I know?