You've already forked ansible-role-common
Add Makefile
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,6 +12,7 @@ roles/*
|
|||||||
!files/authorized_keys/
|
!files/authorized_keys/
|
||||||
files/authorized_keys/*
|
files/authorized_keys/*
|
||||||
!files/authorized_keys/.gitkeep
|
!files/authorized_keys/.gitkeep
|
||||||
|
env/
|
||||||
|
|
||||||
# Do not commit Vault password
|
# Do not commit Vault password
|
||||||
.vault_password.txt
|
.vault_password.txt
|
||||||
|
|||||||
37
Makefile
Normal file
37
Makefile
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
.PHONY: clean virtualenv lint test docker dist dist-upload
|
||||||
|
|
||||||
|
clean:
|
||||||
|
find . -name '*.py[co]' -delete
|
||||||
|
|
||||||
|
virtualenv:
|
||||||
|
virtualenv --prompt '|> ansible-role-common <| ' env
|
||||||
|
env/bin/pip install -r requirements.txt
|
||||||
|
env/bin/ansible-galaxy collection install -r requirements.yml
|
||||||
|
@echo
|
||||||
|
@echo "VirtualENV Setup Complete. Now run: source env/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 .
|
||||||
|
|
||||||
|
|
||||||
|
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/*
|
||||||
Reference in New Issue
Block a user