drone-test-1/.drone.yml
Chris Hammer d39ca50802
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build encountered an error
adding stuff
2023-11-17 00:03:05 -05:00

36 lines
1.1 KiB
YAML

---
name: Test Ansible Linting of drone-test-1
kind: pipeline
type: docker
steps:
- name: Testing Drone CI with a simple Ansible Playbook
image: gitea.thezengarden.net/podman/images/ansible-dev:latest
environment:
GITEA_TOKEN:
from_secret: gitea_token
ANSIBLE_INVENTORY:
from_secret: ansible_inventory
commands:
- ansible-galaxy install -r $DRONE_WORKSPACE/requirements.yml
- ansible-lint --offline $DRONE_WORKSPACE
- ansible-playbook -v -i $ANSIBLE_INVENTORY $DRONE_WORKSPACE/hello.yml
- echo "GITEA_TOKEN=$GITEA_TOKEN"
when:
branch:
- development
- name: Can we post back to the PR
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
- 'curl -sL -X POST -H "Authorization: token $GITEA_TOKEN" \
-H "Content-type: application/json" \
https://gitea.thezengarden.net/api/v1/repos/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/issues/${DRONE_PULL_REQUEST}/comments \
-d "{\"body\": \"giraffe butt\"}"'
when:
event:
- pull_request