Commit Graph

10 Commits

Author SHA1 Message Date
Reid Vandewiele
e46d209f19 Don't assume git is in /usr/bin; expect it on PATH 2019-10-16 10:05:33 -10:00
Reid Vandewiele
ada94157a4 Restore and clarify config_version functionality
This branch is intended as a portability fix. Some functionailty had
been inadvertently removed as unused, but testing revealed that it had a
purpose. Because the purpose was unclear, this commit restores the
functionality AND clarifies it in the script names and comments in
config_version.sh.
2019-10-16 10:26:21 -07:00
Romain Tartière
415a71dd59 Remove code dead for more than 2 years
r10k generates a .r10k-deploy.json file since version 2.1.0 which was
released on October 28, 2015.  New users of the control-repo are not
likely to have a so old version of r10k, so remove this dead code.
2018-05-11 22:28:40 +02:00
Romain Tartière
211ecc58b5 Do sanity checking early
Fail before doing anything when passed parameters are invalid.
2018-05-11 22:26:49 +02:00
Romain Tartière
ffc1769d2e Improve portability
- Fix shebang: `bash` is not always in `/bin/`, and since the script
  does not have bashism, rely on `sh` which is always in `/bin/`;
- Use `/opt/puppetlabs/puppet/bin/ruby` if this file exist and is
  executable, otherwise use `ruby` from $PATH;
- Use `code_manager_config_version.rb` if `.r10k-deploy.json` is found,
  and `config_version.rb` in all other cases.
2018-05-11 22:25:27 +02:00
Nate McCurdy
124b1a2727 config_version: Show the compiling master's name
Prior to this, the config_version script just showed the commit ID of
the version of code being compiled. This commit includes the compiling
Puppet master's hostname and environment name in the config_version.
This is very useful for debugging when a Puppet master is failing and
you have multiple masters behind a load balancer.

The output of config_version now looks like this:

pupmaster01-production-ac9785273a10
2017-07-05 17:09:51 -07:00
Nick Walker
56d0908db2 Update config_version to read r10k_deploy.json file
Update config_version.sh to read the r10k_deploy.json file if it
exists.  If it does not exist it will fall back to the existing
logic
2015-12-18 09:24:27 -08:00
Ranjit Viswakumar
f765903e25 Checking for git first 2015-11-20 14:13:17 +00:00
Nick Walker
869a5c3aa9 Update file permsissions to be 755 on scripts 2015-08-31 13:20:43 -07:00
Nick Walker
568978d76f pulling some stuff from npwalker/control-repo 2015-08-25 11:47:19 -07:00