You've already forked ansible-role-auth-duo
Add Makefule for convenient local tests
This commit is contained in:
38
Makefile
Normal file
38
Makefile
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
.PHONY: clean virtualenv lint test docker dist dist-upload
|
||||||
|
|
||||||
|
clean:
|
||||||
|
find . -name '*.py[co]' -delete
|
||||||
|
|
||||||
|
virtualenv:
|
||||||
|
virtualenv --prompt '|> ansible-role-auth-duo <| ' .venv
|
||||||
|
.venv/bin/pip install -r requirements.txt
|
||||||
|
.venv/bin/ansible-galaxy collection install -r requirements.yml
|
||||||
|
@echo
|
||||||
|
@echo "VirtualENV Setup Complete. Now run: source .venv/bin/activate"
|
||||||
|
@echo
|
||||||
|
|
||||||
|
test:
|
||||||
|
for distro in centos7 almalinux8 ; do \
|
||||||
|
MOLECULE_DISTRO=$$distro molecule test --all ; \
|
||||||
|
done
|
||||||
|
|
||||||
|
lint:
|
||||||
|
@echo
|
||||||
|
@echo "Linting with Ansible-lint"
|
||||||
|
@echo
|
||||||
|
ansible-lint .
|
||||||
|
yamllint .
|
||||||
|
|
||||||
|
|
||||||
|
docker: clean
|
||||||
|
docker buildx build --platform 'linux/amd64,linux/arm64' --push \
|
||||||
|
-t hub.cybercinch.nz/cybercinch/imap_retention_manager:latest \
|
||||||
|
-t docker.io/cybercinch/imap_retention_manager:latest .
|
||||||
|
|
||||||
|
dist: clean
|
||||||
|
rm -rf dist/*
|
||||||
|
python setup.py sdist
|
||||||
|
python setup.py bdist_wheel
|
||||||
|
|
||||||
|
dist-upload:
|
||||||
|
twine upload dist/*
|
||||||
6
requirements.txt
Normal file
6
requirements.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
ansible-core<2.17
|
||||||
|
ansible-compat<4
|
||||||
|
molecule[docker]<5.0.0
|
||||||
|
ansible-lint==6.16.2
|
||||||
|
yamllint==1.32.0
|
||||||
|
passlib==1.7.4
|
||||||
3
requirements.yml
Normal file
3
requirements.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
collections:
|
||||||
|
- ansible.windows
|
||||||
|
- community.general
|
||||||
Reference in New Issue
Block a user