Compare commits

...

3 Commits

Author SHA1 Message Date
Thomas Woerner
38b3e817ad Merge pull request #499 from rjeffman/utils_fix_covscan_findings_lint_check
Fix build-galaxy.sh execution and add running info.
2021-01-18 15:04:49 +01:00
Rafael Guterres Jeffman
a292645a01 Fix build-galaxy.sh execution and add running info.
This patch adds a missing argument to `read` and adds information
on which step is being executed.
2021-01-18 10:46:19 -03:00
Thomas Woerner
6ffc51a75f utils/build-galaxy-release.sh: Use proper variable for galaxify
A wrong variable was used inside of the while IFS read loops. This
prevented that the modules, playbooks, tasks, example playbooks and also
tests have been adapted for the galaxy release naming scheme.
2021-01-18 14:19:41 +01:00

View File

@@ -15,49 +15,61 @@ find . -name "*~" -exec rm {} \;
sed -i -e "s/ansible.module_utils.ansible_freeipa_module/ansible_collections.${collection_prefix}.plugins.module_utils.ansible_freeipa_module/" plugins/modules/*.py
(cd plugins/module_utils && {
ln -s ../../roles/*/module_utils/*.py .
ln -sf ../../roles/*/module_utils/*.py .
})
(cd plugins/modules && {
sed -i -e "s/ansible.module_utils.ansible_ipa_/ansible_collections.${collection_prefix}.plugins.module_utils.ansible_ipa_/" ../../roles/*/library/*.py
ln -s ../../roles/*/library/*.py .
ln -sf ../../roles/*/library/*.py .
})
[ ! -x plugins/action_plugins ] && mkdir plugins/action_plugins
(cd plugins/action_plugins && {
ln -s ../../roles/*/action_plugins/*.py .
ln -sf ../../roles/*/action_plugins/*.py .
})
echo "Fixing examples in plugins/modules..."
find plugins/modules -name "*.py" -print0 |
while IFS= read -d -r '' line; do
python utils/galaxyfy-module-EXAMPLES.py "$x" \
while IFS= read -d '' -r line; do
python utils/galaxyfy-module-EXAMPLES.py "$line" \
"ipa" "$collection_prefix"
done
echo -e "\033[AFixing examples in plugins/modules... \033[32;1mDONE\033[0m"
echo "Fixing examples in roles/*/library..."
find roles/*/library -name "*.py" -print0 |
while IFS= read -d -r '' line; do
python utils/galaxyfy-module-EXAMPLES.py "$x" \
while IFS= read -d '' -r line; do
python utils/galaxyfy-module-EXAMPLES.py "$line" \
"ipa" "$collection_prefix"
done
echo -e "\033[AFixing examples in roles/*/library... \033[32;1mDONE\033[0m"
for x in roles/*/tasks/*.yml; do
python utils/galaxyfy-playbook.py "$x" "ipa" "$collection_prefix"
echo "Fixing playbooks in roles/*/tasks..."
for line in roles/*/tasks/*.yml; do
python utils/galaxyfy-playbook.py "$line" "ipa" "$collection_prefix"
done
echo -e "\033[AFixing playbooks in roles/*tasks... \033[32;1mDONE\033[0m"
echo "Fixing playbooks in playbooks..."
find playbooks -name "*.yml" -print0 |
while IFS= read -d -r '' line; do
python utils/galaxyfy-playbook.py "$x" "ipa" "$collection_prefix"
while IFS= read -d '' -r line; do
python utils/galaxyfy-playbook.py "$line" "ipa" "$collection_prefix"
done
echo -e "\033[AFixing playbooks in playbooks... \033[32;1mDONE\033[0m"
echo "Fixing README(s)..."
find . -name "README*.md" -print0 |
while IFS= read -d -r '' line; do
python utils/galaxyfy-README.py "$x" "ipa" "$collection_prefix"
while IFS= read -d '' -r line; do
python utils/galaxyfy-README.py "$line" "ipa" "$collection_prefix"
done
echo -e "\033[AFixing examples in plugins/modules... \033[32;1mDONE\033[0m"
echo "Fixing playbbooks in tests..."
find tests -name "*.yml" -print0 |
while IFS= read -d -r '' line; do
python utils/galaxyfy-playbook.py "$x" "ipa" "$collection_prefix"
while IFS= read -d '' -r line; do
python utils/galaxyfy-playbook.py "$line" "ipa" "$collection_prefix"
done
echo -e "\033[AFixing playbooks in tests... \033[32;1mDONE\033[0m"
#git diff