test-proj/.woodpecker.yml

30 lines
910 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:
image: plugins/matrix
settings:
homeserver: https://pnut-matrix.dreamfall.space
roomid: qjafxbUILIiwzyJWqf:mcmillian.ems.host
username: woodpeckerci
password:
from_secret: matrix_secret
environment:
- DRONE_BUILD_STATUS=$CI_BUILD_STATUS
- DRONE_REPO_OWNER=$CI_REPO_OWNER
- DRONE_REPO_NAME=$CI_REPO_NAME
- DRONE_COMMIT=$CI_COMMIT_REF
- DRONE_BUILD_LINK=$CI_BUILD_LINK
- DRONE_BRANCH=$CI_COMMIT_BRANCH