drone-test-1/.drone.yml
Chris Hammer c09d9eb878
All checks were successful
continuous-integration/drone/push Build is passing
add pwd and tree commands; remove some others
2023-11-19 00:57:27 -05:00

80 lines
1.4 KiB
YAML

---
kind: pipeline
type: docker
name: run_ansible_tests
global-variables:
ansible_image : &ansible_image "gitea.thezengarden.net/podman/images/ansible-dev:latest"
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
ansible_playbook : &ansible_playbook "hello.yml"
environment:
ANSIBLE_INVENTORY : *ansible_inventory
ANSIBLE_PLAYBOOK : *ansible_playbook
ANSIBLE_DOCKER_IMAGE : *ansible_image
trigger:
branch:
exclude:
- main
event: [push]
steps:
- name: "ansible_environment_verify"
image: *ansible_image
commands:
- git log -1
- ansible --version
- ansible-lint --version
- name: "ansible_galaxy_requirements"
image: *ansible_image
commands:
- ansible-galaxy install -r requirements.yml
- name: "ansible_lint"
image: *ansible_image
commands:
- ansible-lint --offline
- name: "ansible_playbook_execution"
image: *ansible_image
commands:
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
---
kind: pipeline
type: exec
name: check_docker
trigger:
branch:
exclude:
- main
event: [push]
depends_on:
- run_ansible_tests
steps:
- name: check_env
commands:
- whoami
- hostnamectl
- env
- pwd
- tree
- name: docker_info
commands:
- docker info
- name: docker_images
commands:
- docker images
- name: docker_psa
commands:
- docker ps -a