Files
plugin-drone-diagnostics/README.md
T
TP Honey 5ec2e14292 Merge pull request #1 from drone-plugins/publish_test
(feat) add publish and test steps
2021-05-28 17:49:33 +01:00

67 lines
1.2 KiB
Markdown

# drone-diagnostics
A plugin with cli tools to diagnose issues in a build.
## Usage
This plugin has a number of diagnosic tools installed, use the command syntax to access them.
Installed tools:
- ping
- traceroute
### Example 1
The below example skips the implicit clone step. Then displays the environment variables, then checks access to github. With ping and traceroute.
```yaml
kind: pipeline
name: default
clone:
disable: true
steps:
- name: run plugins/drone-diagnostics plugin
image: plugins/drone-diagnostics
pull: if-not-exists
commands:
- env
- ping www.github.com -w 5
- traceroute -T -p 443 www.github.com
- echo "end of test"
```
### Example 2
If the ftp upload fails, check connectivity to the ftp server. Useful for flakey networks.
```yaml
kind: pipeline
name: default
steps:
- name: upload to ftp server
image: alpine
commands:
- echo 'ftp rules' # perform some ftp commands
- name: run plugins/drone-diagnostics plugin
image: plugins/drone-diagnostics
pull: if-not-exists
commands:
- ping ftp.server
- echo "end of test"
when:
status:
- failure
```
## Building
Build the plugin image:
```text
docker build -t plugins/drone-diagnostics -f docker/Dockerfile .
```