From 78628c0dfa864c56dacf1a15c8df5a52b70b39fc Mon Sep 17 00:00:00 2001 From: Paul Atkinson Date: Fri, 4 Sep 2020 13:00:11 +0100 Subject: [PATCH] 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 --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7aa15fda..de6aac6c 100644 --- a/README.md +++ b/README.md @@ -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` -If you do not set the `CASC_JENKINS_CONFIG` environment variable, the plugin will -default to looking for a single config file in `$JENKINS_HOME/jenkins.yaml`. +Instead of setting the `CASC_JENKINS_CONFIG` environment variable, you can also define using +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`.