This commit is contained in:
parent
34e01ff766
commit
a80dad2bdc
1 changed files with 47 additions and 23 deletions
70
.drone.yml
70
.drone.yml
|
|
@ -31,17 +31,17 @@ steps:
|
||||||
# requirements: requirements.txt
|
# requirements: requirements.txt
|
||||||
# galaxy: requirements.yml
|
# galaxy: requirements.yml
|
||||||
syntax_check: true
|
syntax_check: true
|
||||||
# when:
|
when:
|
||||||
# event:
|
event:
|
||||||
# - pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
image: cytopia/ansible-lint
|
image: cytopia/ansible-lint
|
||||||
commands:
|
commands:
|
||||||
- ansible-lint playbook.yml --force-color
|
- ansible-lint playbook.yml --force-color
|
||||||
# when:
|
when:
|
||||||
# event:
|
event:
|
||||||
# - pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: Show Diff and Check
|
- name: Show Diff and Check
|
||||||
image: plugins/ansible:3
|
image: plugins/ansible:3
|
||||||
|
|
@ -59,22 +59,46 @@ steps:
|
||||||
ssh_extra_args: "-o StrictHostKeyChecking=no"
|
ssh_extra_args: "-o StrictHostKeyChecking=no"
|
||||||
# requirements: requirements.txt
|
# requirements: requirements.txt
|
||||||
# galaxy: requirements.yml
|
# galaxy: requirements.yml
|
||||||
# when:
|
when:
|
||||||
# event:
|
event:
|
||||||
# - pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: webhook-pr
|
# - name: webhook-pr
|
||||||
image: plugins/webhook
|
# image: plugins/webhook
|
||||||
|
# settings:
|
||||||
|
# username:
|
||||||
|
# from_secret: mattermost_username
|
||||||
|
# password:
|
||||||
|
# from_secret: mattermost_password
|
||||||
|
# urls: https://chat.host-ranger.ch/hooks/9e39cidaqt8d7f9hd4gmutkngr
|
||||||
|
# content_type: application/json
|
||||||
|
# template: |
|
||||||
|
# {
|
||||||
|
# "owner": "$DRONE_REPO_OWNER",
|
||||||
|
# "repo": "$DRONE_REPO_NAME",
|
||||||
|
# "status": "$DRONE_BUILD_STATUS"
|
||||||
|
# }
|
||||||
|
|
||||||
|
- name: Apply Playbook
|
||||||
|
image: plugins/ansible
|
||||||
settings:
|
settings:
|
||||||
username:
|
become: true
|
||||||
from_secret: mattermost_username
|
playbook: playbook.yml
|
||||||
password:
|
inventory: hosts
|
||||||
from_secret: mattermost_password
|
limit: testing
|
||||||
urls: https://chat.host-ranger.ch/hooks/9e39cidaqt8d7f9hd4gmutkngr
|
user:
|
||||||
content_type: application/json
|
from_secret: drone_ansible_user
|
||||||
template: |
|
private_key:
|
||||||
{
|
from_secret: drone_ansible_ssh_private_key
|
||||||
"owner": "$DRONE_REPO_OWNER",
|
diff: true
|
||||||
"repo": "$DRONE_REPO_NAME",
|
check: true
|
||||||
"status": "$DRONE_BUILD_STATUS"
|
ssh_extra_args: "-o StrictHostKeyChecking=no"
|
||||||
}
|
# requirements: requirements.txt
|
||||||
|
# galaxy: requirements.yml
|
||||||
|
diff: true
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- tag
|
||||||
Loading…
Add table
Reference in a new issue