test-proj/.woodpecker.yml

26 lines
689 B
YAML
Raw Permalink Normal View History

2023-03-08 22:52:10 +00:00
pipeline:
2023-03-09 15:44:23 +00:00
test:
2023-03-09 16:35:15 +00:00
image: alpine:latest
2023-03-09 15:44:23 +00:00
secrets: [ ssh_key ]
environment:
- ANSIBLE_PRIVATE_KEY=$SSH_KEY
2023-03-09 15:46:59 +00:00
- ANSIBLE_HOST_KEY_CHECKING=False
2023-03-09 15:44:23 +00:00
commands:
2023-03-09 16:40:09 +00:00
- apk add --update ansible
2023-03-09 16:35:15 +00:00
- printf "$SSH_KEY" > /tmp/privateKey
2023-03-09 15:50:08 +00:00
- chmod 600 /tmp/privateKey
2023-03-09 15:56:14 +00:00
- sha256sum /tmp/privateKey
2023-03-09 16:40:09 +00:00
- ansible-playbook --user igor --inventory hosts.ini --private-key /tmp/privateKey main.yml
2023-03-09 15:44:23 +00:00
2023-03-09 19:11:08 +00:00
notify:
2023-03-09 20:22:54 +00:00
image: deblan/woodpecker-email
2023-03-09 19:11:08 +00:00
settings:
2023-03-09 21:45:47 +00:00
from: woodpecker@clacks.network
2023-03-09 20:22:54 +00:00
host: smtp.migadu.com
2023-03-09 21:35:58 +00:00
username:
from_secret: smtp_user
password:
from_secret: smtp_pass
recipients:
- morgan@clacks.network