test-proj/.woodpecker.yml

24 lines
676 B
YAML
Raw 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 21:25:34 +00:00
secrets: [ smtp_user, smtp_pass ]
2023-03-09 19:11:08 +00:00
settings:
2023-03-09 20:22:54 +00:00
from.address: woodpecker@clacks.network
from.name: woodpecker-ci
host: smtp.migadu.com
2023-03-09 21:25:34 +00:00
username: $SMTP_USER
password: $SMTP_PASS