fix hello.yml; .drone-ci.yml refinements
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
3a02d1d9bd
commit
2ed92a0eda
31
.drone.yml
31
.drone.yml
@ -1,12 +1,18 @@
|
|||||||
---
|
---
|
||||||
name: Ansible Playbook Lint and Test Execution
|
name: run_ansible_tests
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
|
|
||||||
|
|
||||||
|
environment:
|
||||||
|
ANSIBLE_DOCKER_IMAGE : gitea.thezengarden.net/podman/images/ansible-dev:latest
|
||||||
|
ANSIBLE_INVENTORY : "-i 127.0.0.1, --connection=local"
|
||||||
|
ANSIBLE_PLAYBOOK : hello.yml
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Verify environment"
|
- name: "ansible_environment_verify"
|
||||||
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
|
image: "$ANSIBLE_DOCKER_IMAGE"
|
||||||
commands:
|
commands:
|
||||||
- git log -1
|
- git log -1
|
||||||
- ansible --version
|
- ansible --version
|
||||||
@ -17,13 +23,8 @@ steps:
|
|||||||
event: [push]
|
event: [push]
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
- name: "ansible_galaxy_requirements"
|
||||||
###############################################################################
|
image: "$ANSIBLE_DOCKER_IMAGE"
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
- name: "Ansible-Galaxy: Install from requirements.yml"
|
|
||||||
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
|
|
||||||
commands:
|
commands:
|
||||||
- ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
|
- ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
|
||||||
when:
|
when:
|
||||||
@ -32,8 +33,8 @@ steps:
|
|||||||
event: [push]
|
event: [push]
|
||||||
|
|
||||||
|
|
||||||
- name: "Syntax check and Ansible Lint"
|
- name: "ansible_lint"
|
||||||
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
|
image: "$ANSIBLE_DOCKER_IMAGE"
|
||||||
commands:
|
commands:
|
||||||
- ansible-lint --offline $DRONE_WORKSPACE
|
- ansible-lint --offline $DRONE_WORKSPACE
|
||||||
when:
|
when:
|
||||||
@ -42,13 +43,13 @@ steps:
|
|||||||
event: [push]
|
event: [push]
|
||||||
|
|
||||||
|
|
||||||
- name: "Test playbook execution"
|
- name: "ansible_playbook_execution"
|
||||||
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
|
image: "$ANSIBLE_DOCKER_IMAGE"
|
||||||
environment:
|
environment:
|
||||||
ANSIBLE_INVENTORY:
|
ANSIBLE_INVENTORY:
|
||||||
from_secret: ansible_inventory
|
from_secret: ansible_inventory
|
||||||
commands:
|
commands:
|
||||||
- ansible-playbook -v -i 127.0.0.1, --connection=local $DRONE_WORKSPACE/hello.yml
|
- ansible-playbook -v $ANSIBLE_INVENTORY $DRONE_WORKSPACE/$ANSIBLE_PLAYBOOK
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- development
|
- development
|
||||||
|
Loading…
x
Reference in New Issue
Block a user