79 lines
No EOL
1.7 KiB
YAML
79 lines
No EOL
1.7 KiB
YAML
kind: pipeline
|
|
name: default
|
|
type: docker
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
|
|
steps:
|
|
- name: check SSH
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host:
|
|
- test.band-on.com
|
|
username:
|
|
from_secret: drone_ansible_user
|
|
key:
|
|
from_secret: drone_ansible_ssh_private_key
|
|
port: 22
|
|
command_timeout: 2m
|
|
script:
|
|
- echo "Hello World"
|
|
|
|
- name: Syntax Check
|
|
image: plugins/ansible:3
|
|
settings:
|
|
become: true
|
|
playbook: playbook.yml
|
|
inventory: hosts
|
|
ssh_extra_args: "-o StrictHostKeyChecking=no"
|
|
# requirements: requirements.txt
|
|
# galaxy: requirements.yml
|
|
syntax_check: true
|
|
# when:
|
|
# event:
|
|
# - pull_request
|
|
|
|
- name: Lint
|
|
image: cytopia/ansible-lint
|
|
commands:
|
|
- ansible-lint playbook.yml --force-color
|
|
# when:
|
|
# event:
|
|
# - pull_request
|
|
|
|
- name: Show Diff and Check
|
|
image: plugins/ansible:3
|
|
settings:
|
|
become: true
|
|
playbook: playbook.yml
|
|
inventory: hosts
|
|
limit: testing
|
|
user:
|
|
from_secret: drone_ansible_user
|
|
private_key:
|
|
from_secret: drone_ansible_ssh_private_key
|
|
diff: true
|
|
check: true
|
|
ssh_extra_args: "-o StrictHostKeyChecking=no"
|
|
# requirements: requirements.txt
|
|
# galaxy: requirements.yml
|
|
# when:
|
|
# event:
|
|
# - pull_request
|
|
|
|
- name: matrix-pr
|
|
# image: plugins/matrix
|
|
image: spotlightkid/drone-matrixchat-notify
|
|
settings:
|
|
homeserver: 'https://matrix.skunklab.ch'
|
|
roomid: '!riCgKYKseXqVODyuUG:skunklab.ch'
|
|
userid: '@rulrich:skunklab.ch'
|
|
accesstoken:
|
|
from_secret: matrix_accesstoken
|
|
passwort: ''
|
|
template: |
|
|
`${DRONE_REPO}` build #${DRONE_BUILD_NUMBER} status: **${DRONE_BUILD_STATUS}**
|
|
|
|
${DRONE_PULL_REQUEST_TITLE}](${DRONE_COMMIT_LINK}) |