drone-test-1/.drone.yml
Chris Hammer 1d9bb863d0
Some checks failed
continuous-integration/drone/push Build is failing
add the other missing quote lol
2023-11-19 01:35:51 -05:00

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