reorder globals; replace task events with single trigger section; add local exec to see whats up
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c5de2157c3
commit
cdf37dca49
88
.drone.yml
88
.drone.yml
@ -1,20 +1,23 @@
|
|||||||
---
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: run_ansible_tests
|
||||||
|
|
||||||
global-variables:
|
global-variables:
|
||||||
ansible_image: &ansible_image "gitea.thezengarden.net/podman/images/ansible-dev:latest"
|
ansible_image: &ansible_image "gitea.thezengarden.net/podman/images/ansible-dev:latest"
|
||||||
ansible_inventory: &ansible_inventory "-i 127.0.0.1, --connection=local"
|
ansible_inventory: &ansible_inventory "-i 127.0.0.1, --connection=local"
|
||||||
ansible_playbook: &ansible_playbook "hello.yml"
|
ansible_playbook: &ansible_playbook "hello.yml"
|
||||||
|
|
||||||
|
|
||||||
name: run_ansible_tests
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
ANSIBLE_INVENTORY : *ansible_inventory
|
ANSIBLE_INVENTORY : *ansible_inventory
|
||||||
ANSIBLE_PLAYBOOK : *ansible_playbook
|
ANSIBLE_PLAYBOOK : *ansible_playbook
|
||||||
ANSIBLE_DOCKER_IMAGE : *ansible_image
|
ANSIBLE_DOCKER_IMAGE : *ansible_image
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
exclude:
|
||||||
|
- main
|
||||||
|
event: [push]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "ansible_environment_verify"
|
- name: "ansible_environment_verify"
|
||||||
@ -23,44 +26,77 @@ steps:
|
|||||||
- git log -1
|
- git log -1
|
||||||
- ansible --version
|
- ansible --version
|
||||||
- ansible-lint --version
|
- ansible-lint --version
|
||||||
when:
|
# when:
|
||||||
branch:
|
# branch:
|
||||||
exclude:
|
# exclude:
|
||||||
- main
|
# - main
|
||||||
event: [push]
|
# event: [push]
|
||||||
|
|
||||||
|
|
||||||
- name: "ansible_galaxy_requirements"
|
- name: "ansible_galaxy_requirements"
|
||||||
image: *ansible_image
|
image: *ansible_image
|
||||||
commands:
|
commands:
|
||||||
- ansible-galaxy install -r requirements.yml
|
- ansible-galaxy install -r requirements.yml
|
||||||
when:
|
# when:
|
||||||
branch:
|
# branch:
|
||||||
exclude:
|
# exclude:
|
||||||
- main
|
# - main
|
||||||
event: [push]
|
# event: [push]
|
||||||
|
|
||||||
|
|
||||||
- name: "ansible_lint"
|
- name: "ansible_lint"
|
||||||
image: *ansible_image
|
image: *ansible_image
|
||||||
commands:
|
commands:
|
||||||
- ansible-lint --offline
|
- ansible-lint --offline
|
||||||
when:
|
# when:
|
||||||
branch:
|
# branch:
|
||||||
exclude:
|
# exclude:
|
||||||
- main
|
# - main
|
||||||
event: [push]
|
# event: [push]
|
||||||
|
|
||||||
|
|
||||||
- name: "ansible_playbook_execution"
|
- name: "ansible_playbook_execution"
|
||||||
image: *ansible_image
|
image: *ansible_image
|
||||||
commands:
|
commands:
|
||||||
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
||||||
when:
|
# when:
|
||||||
branch:
|
# branch:
|
||||||
exclude:
|
# exclude:
|
||||||
- main
|
# - main
|
||||||
event: [push]
|
# event: [push]
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: exec
|
||||||
|
name: check_docker
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
exclude:
|
||||||
|
- main
|
||||||
|
event: [push]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: check_env
|
||||||
|
commands:
|
||||||
|
- env
|
||||||
|
- whoami
|
||||||
|
- hostnamectl
|
||||||
|
- lscpu
|
||||||
|
- free -h
|
||||||
|
- lsblk -f
|
||||||
|
|
||||||
|
- name: docker_info
|
||||||
|
commands:
|
||||||
|
- docker info
|
||||||
|
|
||||||
|
- name: docker_images
|
||||||
|
commands:
|
||||||
|
- docker images
|
||||||
|
|
||||||
|
- name: docker_psa
|
||||||
|
commands:
|
||||||
|
- docker ps -a
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user