Skip to content

Commit

Permalink
Use nc through docker in case it isn't installed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Langevin committed May 15, 2020
1 parent b2a9d97 commit 1f5a367
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/report-to-datadog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ function reportToDatadog() {
DD_PORT=${BUILDKITE_PLUGIN_DATADOG_STATS_DOGSTATSD_PORT:-8125}

echo "Reporting ${metric_name} with value=${metric_value}, type=${metric_type}, tags=${tags}"
echo -n "${metric_name}:${metric_value}|${metric_type}|#${tags}" | nc -u -w1 "${DD_HOST}" "${DD_PORT}"
echo -n "${metric_name}:${metric_value}|${metric_type}|#${tags}" | docker run -i --rm docker run -i --rm subfuzion/netcat -4u -w1 "${DD_HOST}" "${DD_PORT}"
}
3 changes: 1 addition & 2 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Datadog Stats
description: Collects detailed stats on build times and outcomes and sends to datadog
author: https://github.com/better
requirements:
- buildkite-agent
- nc
- docker
configuration:
properties:
dogstatsd_host:
Expand Down

0 comments on commit 1f5a367

Please sign in to comment.