Improve README with more detail about hidden directory exclusions (#1410)

* Improve README with more detail about hidden directory exclusions

* Move exclusion examples into collapsible section
This commit is contained in:
Slavo 2020-06-01 18:58:16 +01:00 committed by GitHub
parent 52f60f8243
commit 01d285b34d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -100,7 +100,21 @@ Second, the plugin looks for the `CASC_JENKINS_CONFIG` environment variable. The
- A full path to a single file. For example, `/var/jenkins_home/casc_configs/jenkins.yaml`.
- A URL pointing to a file served on the web. For example, `https://acme.org/jenkins.yaml`.
If `CASC_JENKINS_CONFIG` points to a folder, the plugin will recursively traverse the folder to find file (suffix with .yml,.yaml,.YAML,.YML), but doesn't contain hidden files or hidden subdirectories. It follows symbolic links for both files and directories.
If `CASC_JENKINS_CONFIG` points to a folder, the plugin will recursively traverse the folder to find file(s) with .yml,.yaml,.YAML,.YML suffix. It will exclude hidden files or files that contain a hidden folder in **any part** of the full path. It follows symbolic links for both files and directories.
<details><summary>Exclusion examples</summary>
`CASC_JENKINS_CONFIG=/jenkins/casc_configs`
:heavy_check_mark: `/jenkins/casc_configs/jenkins.yaml`
:heavy_check_mark: `/jenkins/casc_configs/dir1/config.yaml`
:x: `/jenkins/casc_configs/.dir1/config.yaml`
:x: `/jenkins/casc_configs/..dir2/config.yaml`
`CASC_JENKINS_CONFIG=/jenkins/.configs/casc_configs` contains hidden folder `.config`
:x: `/jenkins/.configs/casc_configs/jenkins.yaml`
:x: `/jenkins/.configs/casc_configs/dir1/config.yaml`
:x: `/jenkins/.configs/casc_configs/.dir1/config.yaml`
:x: `/jenkins/.configs/casc_configs/..dir2/config.yaml`
</details>
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`.