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
This commit is contained in:
parent
b8d4980f86
commit
56d0908db2
9
scripts/code_manager_config_version.rb
Normal file
9
scripts/code_manager_config_version.rb
Normal file
@ -0,0 +1,9 @@
|
||||
require 'json'
|
||||
|
||||
environmentpath = ARGV[0]
|
||||
environment = ARGV[1]
|
||||
|
||||
r10k_deploy_file_path = File.join(environmentpath, environment, '.r10k-deploy.json')
|
||||
|
||||
#output the sha1 from the control-repo
|
||||
puts JSON.parse(File.read(r10k_deploy_file_path))['signature']
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
if [ -e /opt/puppetlabs/server/pe_version ]
|
||||
if [ -e $1/$2/.r10k-deploy.json ]
|
||||
then
|
||||
/opt/puppetlabs/puppet/bin/ruby $1/$2/scripts/code_manager_config_version.rb $1 $2
|
||||
elif [ -e /opt/puppetlabs/server/pe_version ]
|
||||
then
|
||||
/opt/puppetlabs/puppet/bin/ruby $1/$2/scripts/config_version.rb $1 $2
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user