control-repo
control-repo copied to clipboard
Handle colon-delimited environmentpath in config_version.sh
environment.conf passes the Puppet configuration value $environmentpath as an argument to config_version.sh. This value supports a colon-separated list of paths, but when one is used the config_version scripts currently bomb out.
This fixes them to handle colon-delimited environmentpath.
@mbaynton Can you share an example of the script bombing out?
After modifying the compile master's puppet.conf to include several colon-delimited environment paths, I was getting the following on agents during puppet runs:
Info: Loading facts
Info: Caching catalog for adsinternal-pupp4.msi.umn.edu
Info: Applying configuration version 'fatal: Not a git repository: '/etc/puppetlabs/code/environments:/etc/puppetlabs/code/default_environment/production/.git'
1522333495'
Apologies this as taken so long to get to @mbaynton can you rebase the pull request please and if it's still required i'll merge it in.
Rebased and merged @abuxton Full disclosure I don't currently use Puppet anymore so my ability to test is limited, but did try just invoking the merged version on some different inputs.
I just ran into a similar situation where a : delimited environmentpath wasn't working and used this PR for inspiration to fix fork of config_version.sh
It works 👍
Though I do have a minor style nitpick about using upper case variables for things that aren't environment variables.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.