From 86397c10b2e125708cd575e2983dbc7688920e49 Mon Sep 17 00:00:00 2001 From: Maxime VISONNEAU Date: Wed, 17 Jan 2018 17:21:54 +0000 Subject: [PATCH] Updated healthcheck and code-content-command --- bin/code-content-command | 6 +++++- docker-healthcheck.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/code-content-command b/bin/code-content-command index a42733c..c790bde 100755 --- a/bin/code-content-command +++ b/bin/code-content-command @@ -4,4 +4,8 @@ if [[ $# < 3 ]]; then echo Expected environment, code-id, file-path >&2 exit 1 fi -cd /etc/puppetlabs/code/environments/"$1" && git show "$2":"$3" + +# Ignore modules files which are not part of the repo anyway +echo $3 | grep -qE "^modules/" && cat /etc/puppetlabs/code/environments/${1}/${3} && exit 0 + +cd /etc/puppetlabs/code/environments/${1} && git show ${2}:${3} diff --git a/docker-healthcheck.sh b/docker-healthcheck.sh index f9bccdf..c4ed113 100755 --- a/docker-healthcheck.sh +++ b/docker-healthcheck.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -curl --fail -H 'Accept: pson' \ +curl -s --fail -H 'Accept: pson' \ --resolve 'puppet:8140:127.0.0.1' \ --cert $(puppet config print hostcert) \ --key $(puppet config print hostprivkey) \