Merge pull request 'updates to .drone.yml' (#7) from development into main
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #7
This commit is contained in:
commit
6377a24219
@ -1,2 +1,3 @@
|
||||
skip_list:
|
||||
- yaml[line-length]
|
||||
- yaml[colons]
|
||||
|
82
.drone.yml
82
.drone.yml
@ -1,12 +1,24 @@
|
||||
---
|
||||
name: Ansible Playbook Lint and Test Execution
|
||||
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"
|
||||
|
||||
|
||||
name: run_ansible_tests
|
||||
kind: pipeline
|
||||
type: docker
|
||||
|
||||
|
||||
environment:
|
||||
ANSIBLE_INVENTORY : *ansible_inventory
|
||||
ANSIBLE_PLAYBOOK : *ansible_playbook
|
||||
ANSIBLE_DOCKER_IMAGE : *ansible_image
|
||||
|
||||
|
||||
steps:
|
||||
- name: "Verify environment"
|
||||
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
|
||||
- name: "ansible_environment_verify"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- git log -1
|
||||
- ansible --version
|
||||
@ -17,50 +29,34 @@ steps:
|
||||
event: [push]
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
- name: "ansible_galaxy_requirements"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
|
||||
when:
|
||||
branch:
|
||||
- development
|
||||
event: [push]
|
||||
|
||||
|
||||
# - name: "Ansible-Galaxy: Install from requirements.yml"
|
||||
# image: gitea.thezengarden.net/podman/images/ansible-dev:latest
|
||||
# commands:
|
||||
# - ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
|
||||
# when:
|
||||
# branch:
|
||||
# - development
|
||||
# event:
|
||||
# exclude:
|
||||
# - pull_request
|
||||
- name: "ansible_lint"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-lint --offline $DRONE_WORKSPACE
|
||||
when:
|
||||
branch:
|
||||
- development
|
||||
event: [push]
|
||||
|
||||
|
||||
# - name: "Syntax check and Ansible Lint"
|
||||
# image: gitea.thezengarden.net/podman/images/ansible-dev:latest
|
||||
# commands:
|
||||
# - ansible-lint --offline $DRONE_WORKSPACE
|
||||
# - ansible-playbook --syntax-check $DRONE_WORKSPACE/hello.yml
|
||||
# when:
|
||||
# branch:
|
||||
# - development
|
||||
# event:
|
||||
# exclude:
|
||||
# - pull_request
|
||||
|
||||
|
||||
# - name: "Test playbook execution"
|
||||
# image: gitea.thezengarden.net/podman/images/ansible-dev:latest
|
||||
# environment:
|
||||
# ANSIBLE_INVENTORY:
|
||||
# from_secret: ansible_inventory
|
||||
# commands:
|
||||
# - ansible-playbook -v -i 127.0.0.1, --connection=local $DRONE_WORKSPACE/hello.yml
|
||||
# when:
|
||||
# branch:
|
||||
# - development
|
||||
# event:
|
||||
# exclude:
|
||||
# - pull_request
|
||||
- name: "ansible_playbook_execution"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-playbook -v $ANSIBLE_INVENTORY $DRONE_WORKSPACE/$ANSIBLE_PLAYBOOK
|
||||
when:
|
||||
branch:
|
||||
- development
|
||||
event: [push]
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user