Skip to content

Commit

Permalink
Replacing git clone with curl following the suggestion by @richm.
Browse files Browse the repository at this point in the history
#45 (review)
But ansible_role_parser.py is not added to lsr_role2collection.py.
I'm wondering ansible_role_parser.py is more useful to be a library to share?
  • Loading branch information
nhosoi committed Oct 8, 2020
1 parent fc7b802 commit a0ac750
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .travis/runcollection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ SCRIPTDIR=$(readlink -f "$(dirname "$0")")

# Collection commands that are run when `tox -e collection`:
role=$(basename "${TOPDIR}")
toxworkdir=${1:-${TOPDIR}/.tox}
toxworkdir=${1:-"${TOPDIR}"/.tox}
STABLE_TAG=${2:-master}
cd "${toxworkdir}"
toxworkdir=$(pwd)
envlist=${2:- "black,flake8,yamllint,py38,shellcheck"}
envlist=${3:- "black,flake8,yamllint,py38,shellcheck"}
automaintenancerepo=https://raw.githubusercontent.com/linux-system-roles/auto-maintenance/

git clone https://github.com/linux-system-roles/auto-maintenance
curl -L -o lsr_role2collection.py "${automaintenancerepo}${STABLE_TAG}"/lsr_role2collection.py
curl -L -o ansible_role_parser.py "${automaintenancerepo}${STABLE_TAG}"/ansible_role_parser.py

python auto-maintenance/lsr_role2collection.py --src-path "${TOPDIR}/.." --dest-path "${toxworkdir}" --role "${role}" > "${toxworkdir}"/collection.out 2>&1
python lsr_role2collection.py --src-path "${TOPDIR}/.." --dest-path "${toxworkdir}" --role "${role}" > "${toxworkdir}"/collection.out 2>&1

yamllint="${toxworkdir}"/ansible_collections/fedora/system_roles/.yamllint_defaults.yml
sed -i -e 's/\( *\)\(document-start: disable\)/\1\2\n\1line-length:\n\1\1level: warning/' "${yamllint}"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ deps =
ansible
jmespath
commands =
bash {toxinidir}/.travis/runcollection.sh {toxworkdir}
bash {toxinidir}/.travis/runcollection.sh {toxworkdir} master

[testenv:custom]
changedir = {toxinidir}
Expand Down

0 comments on commit a0ac750

Please sign in to comment.