2023-12-09 03:55:20 +05:30
|
|
|
steps:
|
|
|
|
backend:
|
2023-12-09 04:42:25 +05:30
|
|
|
image: python:3-bookworm
|
2023-12-12 19:45:29 +05:30
|
|
|
environment:
|
|
|
|
- ANSIBLE_HOST_KEY_CHECKING=False
|
2023-12-09 03:55:20 +05:30
|
|
|
commands:
|
2023-12-12 19:45:29 +05:30
|
|
|
- export PATH=$PATH:/root/.local/bin
|
|
|
|
- eval "$(ssh-agent -s)"
|
2023-12-11 19:30:28 +05:30
|
|
|
- make ci.init
|
2023-12-11 17:38:36 +05:30
|
|
|
- tofu -chdir=terraform/mcaptcha/ init
|
|
|
|
- tofu -chdir=terraform/mcaptcha/ plan -var-file="ci.tfvars" -out="mcaptcha"
|
2023-12-11 19:30:28 +05:30
|
|
|
- tofu -chdir=terraform/mcaptcha/ apply "mcaptcha"
|
2023-12-12 19:45:29 +05:30
|
|
|
- pip install virtualenv && virtualenv venv
|
|
|
|
- . venv/bin/activate && pip install ansible pytest-testinfra requests
|
|
|
|
- . venv/bin/activate && ansible-galaxy install -r ./ansible/requirements.yml
|
|
|
|
- . venv/bin/activate && ansible-playbook --become -i terraform/mcaptcha/hosts.ini ./ansible/mcaptcha.yml
|
|
|
|
- cat terraform/mcaptcha/hosts.ini
|
|
|
|
- export ANSIBLE_REMOTE_USER=root
|
|
|
|
- . venv/bin/activate && py.test --hosts="ansible://mcaptcha_hosts" --ansible-inventory=terraform/mcaptcha/hosts.ini --verbose tests/cache/base.py
|
|
|
|
- . venv/bin/activate && py.test --hosts="ansible://mcaptcha_hosts" --ansible-inventory=terraform/mcaptcha/hosts.ini --verbose tests/mcaptcha/base.py
|
2023-12-11 19:30:28 +05:30
|
|
|
- make ci.clean
|
2023-12-11 17:38:36 +05:30
|
|
|
secrets: [TEST_NODE_SSH_KEY]
|