Update README.md to include details of how to set the CasC config location via the casc.jenkins.config Java property instead of using the CASC_JENKINS_CONFIG environment variable as it's IMHO a better solution for configuring the path when installing packaged Jenkins (e.g. RPM) instead of changing a package-managed file which could be updated/replaced when Jenkins is updated as not all of us are blessed with the ability to run Jenkins in a container...yet! :) (#1457)

Co-authored-by: Paul Atkinson <atlassian.com@wwwnation.co.uk>
This commit is contained in:
Paul Atkinson 2020-09-04 13:00:11 +01:00 committed by GitHub
parent 3cc6c74795
commit 78628c0dfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -116,8 +116,17 @@ If `CASC_JENKINS_CONFIG` points to a folder, the plugin will recursively travers
:x: `/jenkins/.configs/casc_configs/..dir2/config.yaml` :x: `/jenkins/.configs/casc_configs/..dir2/config.yaml`
</details> </details>
If you do not set the `CASC_JENKINS_CONFIG` environment variable, the plugin will Instead of setting the `CASC_JENKINS_CONFIG` environment variable, you can also define using
default to looking for a single config file in `$JENKINS_HOME/jenkins.yaml`. the `casc.jenkins.config` Java property. This is useful when installing Jenkins via a package
management tool and can't set an environment variable outside of a package-managed file which could
be overwritten by an update. For RHEL/CentOS systems, you can append the following to the
`JENKINS_JAVA_OPTIONS` entry in `/etc/sysconfig/jenkins`
`-Dcasc.jenkins.config=/jenkins/casc_configs`
If you do not set the `CASC_JENKINS_CONFIG` environment variable or the `casc.jenkins.config` Java
property, the plugin will default to looking for a single config file in
`$JENKINS_HOME/jenkins.yaml`.
If everything was setup correctly, you should now be able to browse the Configuration as Code page with `Manage Jenkins` -> `Configuration as Code`. If everything was setup correctly, you should now be able to browse the Configuration as Code page with `Manage Jenkins` -> `Configuration as Code`.