tripleo-upgrade/templates/update_workarounds.sh.j2
caoyuan b8232161c0 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I6725bdc2eff5a367b46075c2bf8baa8f2edbabe5
2019-06-02 12:50:37 +00:00

24 lines
688 B
Django/Jinja

#!/bin/env bash
#
# Apply workarounds for minor updates
#
set -euo pipefail
{% if item.workarounds|default([]) %}
{% for workaround in item.workarounds %}
{% if workaround.patch_id %}
curl -4 'https://review.opendev.org/changes/{{workaround.patch_id}}/revisions/current/patch?download' | \
base64 -d | \
sudo patch -d {{ workaround.directory }} -p1 {{ workaround.misc }}
{% endif %} {# end of item.patch_id #}
{% if workaround.command %}
{{ workaround.command }}
{% endif %} {# apply command for workaround #}
{% endfor %} {# end of workarounds iteration #}
{% else %} {# if workarounds not needed #}
echo "No Workarounds Needed"
exit 0
{% endif %} {# end if no workarounds #}