File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ steps :
2+ - plugins :
3+ - envato/create-datadog-event#main:
4+ api_key : $DATADOG_API_KEY
5+ title : " Hello, world!"
6+ text : Testing the create-datadog-event-buildkite-plugin
7+ tags :
8+ - debug:true
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -eu
4+
5+ # a crude way to run the example using the current version of the code, including changes that haven't been committed
6+
7+ if [[ " $# " -lt 1 ]] || ! [[ -f " $1 " ]]; then
8+ echo " usage: $0 <example-path> [...bk local run args]"
9+ echo
10+ echo " e.g. $0 examples/basic-event.yml -E DATADOG_API_KEY=" ' "$DATADOG_API_KEY"'
11+ exit 1
12+ fi
13+
14+ example=" $1 "
15+ shift
16+ bk_args=( " $@ " )
17+
18+ run_dir=" $( mktemp -d) "
19+
20+ cleanup () {
21+ echo " Removing ${run_dir} "
22+ rm -rf -- " $run_dir "
23+ }
24+ trap ' cleanup' EXIT
25+
26+ cp -r . " ${run_dir} /create-datadog-event-buildkite-plugin"
27+ cp -r ./.git " ${run_dir} /.git"
28+
29+ sed -Ee " s%envato/create-datadog-event#main%file://./create-datadog-event-buildkite-plugin%" " $example " > " ${run_dir} /pipeline.yml" # ./tmp/pipeline.yml
30+
31+ cd " $run_dir "
32+ echo " Running pipeline in $( pwd) "
33+
34+ bk local run ./pipeline.yml " $@ "
You can’t perform that action at this time.
0 commit comments