drone-test-1/.drone.yml
Chris Hammer 2672ce0653
Some checks failed
continuous-integration/drone/push Build is failing
add docker build to test; this should be fun
2023-11-19 01:09:07 -05:00

87 lines
1.6 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
environment:
BUILD_PREFIX: gitea.thezengarden.net/podman/images
trigger:
branch:
exclude:
- main
event: [push]
depends_on:
- run_ansible_tests
steps:
- name: check_env
commands:
- whoami
- hostnamectl
- env
- pwd
- tree
- cat requirements.yml
- name: docker_info
commands:
- docker info
- name: docker_images
commands:
- docker images
- name: docker_psa
commands:
- docker ps -a
- name: docker_build
commands:
- docker build -t $BUILD_PREFIX .