Configuration-as-code-plugin: using JCasC without setting yaml location

Created on 24 Jul 2018  路  2Comments  路  Source: jenkinsci/configuration-as-code-plugin

DEFAULT_JENKINS_YAML_PATH should allow us to put jenkins.yaml in JENKINS_HOME and configuration would be read from there

My JENKINS_HOME (according to Manage Jenkins 鉃★笍 System Information):

JENKINS_HOME | /Users/Shared/Jenkins/Home

and the content:

Ewelinas-MacBookPro:Home ewelinawilkosz$ ls -la /Users/Shared/Jenkins/Home
total 104
drwxr-xr-x   26 jenkins  jenkins   832 Jul 24 13:57 .
drwxr-xr-x    6 jenkins  jenkins   192 Jul 24 13:33 ..
-rw-r--r--    1 jenkins  jenkins  1768 Jul 24 13:56 config.xml
-rw-r--r--    1 jenkins  jenkins   169 Jul 24 13:56 hudson.model.UpdateCenter.xml
-rw-r--r--    1 jenkins  jenkins  1230 Jul 24 13:57 hudson.plugins.emailext.ExtendedEmailPublisher.xml
-rw-r--r--    1 jenkins  jenkins   370 Jul 24 13:33 hudson.plugins.git.GitTool.xml
-rw-------    1 jenkins  jenkins  1712 Jul 24 13:30 identity.key.enc
-rw-r--r--    1 jenkins  jenkins    94 Jul 24 13:30 jenkins.CLI.xml
-rw-r--r--    1 jenkins  jenkins     7 Jul 24 13:34 jenkins.install.InstallUtil.lastExecVersion
-rw-r--r--    1 jenkins  jenkins     7 Jul 24 13:34 jenkins.install.UpgradeWizard.state
-rw-r--r--    1 jenkins  jenkins   179 Jul 24 13:34 jenkins.model.JenkinsLocationConfiguration.xml
-rwxr-xr-x    1 jenkins  jenkins  1739 Jul 24 13:45 jenkins.yaml
drwxr-xr-x    2 jenkins  jenkins    64 Jul 24 13:30 jobs
drwxr-xr-x    3 jenkins  jenkins    96 Jul 24 13:30 logs
-rw-r--r--    1 jenkins  jenkins   907 Jul 24 13:56 nodeMonitors.xml
drwxr-xr-x    2 jenkins  jenkins    64 Jul 24 13:30 nodes
drwxr-xr-x  148 jenkins  jenkins  4736 Jul 24 13:36 plugins
-rw-r--r--    1 jenkins  jenkins   129 Jul 24 13:56 queue.xml.bak
-rw-r--r--    1 jenkins  jenkins    64 Jul 24 13:30 secret.key
-rw-r--r--    1 jenkins  jenkins     0 Jul 24 13:30 secret.key.not-so-secret
drwx------   10 jenkins  jenkins   320 Jul 24 13:34 secrets
drwxr-xr-x    7 jenkins  jenkins   224 Jul 24 13:36 updates
drwxr-xr-x    3 jenkins  jenkins    96 Jul 24 13:30 userContent
drwxr-xr-x    3 jenkins  jenkins    96 Jul 24 13:34 users
drwxr-xr-x   26 jenkins  jenkins   832 Jul 24 13:30 war
drwxr-xr-x    2 jenkins  jenkins    64 Jul 24 13:33 workflow-libs

and yet no configuration happens
checking the log:

Jul 24, 2018 2:18:20 PM FINE org.jenkinsci.plugins.casc.ConfigurationAsCode
No configuration set nor default config file

Just installed Jenkins locally on my mac to verify/describe such use case
Am I missing something obvious?

bug

Most helpful comment

DEFAULT_JENKINS_YAML_PATH = "./jenkins.yaml" != JENKINS_HOME/jenkins.yaml
imho it makes sense to change this default value so it uses jenkins_home

All 2 comments

DEFAULT_JENKINS_YAML_PATH = "./jenkins.yaml" != JENKINS_HOME/jenkins.yaml
imho it makes sense to change this default value so it uses jenkins_home

Was this page helpful?
0 / 5 - 0 ratings