Sudo fix overcloud-custom-tht-script.sh.j2
Using overcloud-custom-tht-script.sh.j2 to use a git clone of tht currently fails because the user lacks permission to modify /usr/share. Also, having the git clone directly into /usr/share is not very useful for those using quickstart for tht development. This change does a git clone of tht to the working directory and symlinks this to /usr/share/ It also makes $HOME readable so that mistral workflows have permission to read the local tripleo. Change-Id: I08f259664c7810f3a1b1373285bfec1227144da9
This commit is contained in:
parent
ac1d2ca3b4
commit
dc30a1e5a1
@ -15,16 +15,19 @@ set -eux
|
||||
## * Clone the t-h-t templates if needed.
|
||||
## ::
|
||||
|
||||
rm -rf {{ overcloud_templates_path }}
|
||||
sudo rm -rf {{ overcloud_templates_path }}
|
||||
chmod 755 $HOME
|
||||
rm -rf {{ working_dir }}/tripleo-heat-templates
|
||||
git clone {% if overcloud_templates_branch is defined %}-b {{ overcloud_templates_branch }} \
|
||||
--single-branch{% endif %} {{ overcloud_templates_repo }} {{ overcloud_templates_path }}
|
||||
--single-branch{% endif %} {{ overcloud_templates_repo }} {{ working_dir }}/tripleo-heat-templates
|
||||
sudo ln -s {{ working_dir }}/tripleo-heat-templates {{ overcloud_templates_path }}
|
||||
|
||||
{% if overcloud_templates_refspec is defined %}
|
||||
## * Checkout an open t-h-t review if specified
|
||||
## (this will stomp on the overcloud_templates_branch, so only one should be used).
|
||||
## ::
|
||||
|
||||
pushd {{overcloud_templates_path}}
|
||||
pushd {{ working_dir }}/tripleo-heat-templates
|
||||
git fetch {{ overcloud_templates_repo }} {{ overcloud_templates_refspec }} && git checkout FETCH_HEAD
|
||||
popd
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user