From 48125f9cdbad6712bde4ab954a3083710efcbb20 Mon Sep 17 00:00:00 2001 From: Alexey Khivin Date: Mon, 4 Jul 2016 14:20:06 +0300 Subject: [PATCH] [Puppet] applyManifest fixed As described in LP-1598232 murano-agent set the working directory depending on where the script is located. Check and set working directory to the root of the temporary folder which created by murano for the current execution plan This code must work even if LP-1598232 will be fixed Change-Id: Id9a29a9d8ea49b56ae8d3457c0308121e390cc62 --- .../package/Resources/scripts/core/apply_manifest.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/murano-apps/Puppet/package/Resources/scripts/core/apply_manifest.sh b/murano-apps/Puppet/package/Resources/scripts/core/apply_manifest.sh index 1122182..8458007 100644 --- a/murano-apps/Puppet/package/Resources/scripts/core/apply_manifest.sh +++ b/murano-apps/Puppet/package/Resources/scripts/core/apply_manifest.sh @@ -1,5 +1,16 @@ #!/usr/bin/env bash +# As described in https://bugs.launchpad.net/murano/+bug/1598232 +# murano-agent set the working directory depending on where the script +# is located. Check and set working directory to the root of the +# temporary folder which created by murano for the current execution plan +# This code must work even if LP1598232 will be fixed + +if [ -d ../core ] +then + cd .. +fi + set +e puppet apply --detailed-exitcodes --color=false "site.pp"