drone-ci-testing/.drone.yml
2019-04-21 03:08:38 +02:00

79 lines
1.7 KiB
YAML

kind: pipeline
name: default
steps:
- name: test
image: alpine
environment:
MYUSERNAME:
from_secret: myusername
commands:
- echo "run env command"
- name: publish
image: plugins/docker
settings:
repo: ruanbekker/dronetest
auto_tag: false
auto_tag_suffix: alpine
tags:
- ${DRONE_COMMIT}
- latest
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
- name: ssh
image: appleboy/drone-ssh
pull: true
settings:
username: root
port: 22
host:
from_secret: ssh_host
key:
from_secret: ssh_key
volumes:
- .:/tmp/ssh
script:
- ls -lah
- ls /tmp/ssh/
- find / -name Dockerfile
- docker node ls
- name: slack
image: plugins/slack
settings:
webhook:
from_secret: slack_webhook
channel: system_events
username: drone
icon_url: https://cdn.shopify.com/s/files/1/1061/1924/products/Virus_Emoji_large.png?v=1480481048
template: >
{{#success build.status}}
build {{build.number}} status: *{{build.status}}*
build link: {{build.link}}
build author: {{build.author}}
build ref: {{build.ref}}
build event: {{build.event}}
build commit: {{build.commit}}
build branch: {{build.branch}}
build deploy: {{build.deployTo}}
{{else}}
build {{build.number}} failed. Fix me please.
{{/success}}
- name: telegram
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_token
to:
from_secret: telegram_to
when:
status: [ success, failure ]
photo:
- https://cdn.shopify.com/s/files/1/1061/1924/products/Virus_Emoji_large.png?v=1480481048
format: markdown