Skip to content

Commit ecb6197

Browse files
committed
feat: don't annotate successful scans by default
1 parent 0578f83 commit ecb6197

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

hooks/post-command

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ dockerImageScan() {
9090
# buildkite-agent artifact upload docker-scan-result --log-level info
9191
case $exit_code in
9292
0)
93-
buildAnnotation "docker" "$image_name" true "$PWD/docker-scan-result" | buildkite-agent annotate --append --style 'success' --context 'ctx-wiz-docker-success'
93+
if [[ -n "${BUILDKITE_PLUGIN_WIZ_ANNOTATE_SUCCESS}" ]]; then
94+
buildAnnotation "docker" "$image_name" true "$PWD/docker-scan-result" | buildkite-agent annotate --append --style 'success' --context 'ctx-wiz-docker-success'
95+
fi
9496
exit 0
9597
;;
9698
*)
@@ -116,7 +118,9 @@ iacScan() {
116118
exit_code="$?"
117119
case $exit_code in
118120
0)
119-
buildAnnotation "iac" "$BUILDKITE_LABEL" true "$PWD/result/output" | buildkite-agent annotate --append --context 'ctx-wiz-iac-success' --style 'success'
121+
if [[ -n "${BUILDKITE_PLUGIN_WIZ_ANNOTATE_SUCCESS}" ]]; then
122+
buildAnnotation "iac" "$BUILDKITE_LABEL" true "$PWD/result/output" | buildkite-agent annotate --append --context 'ctx-wiz-iac-success' --style 'success'
123+
fi
120124
;;
121125
*)
122126
buildAnnotation "iac" "$BUILDKITE_LABEL" false "$PWD/result/output" | buildkite-agent annotate --append --context 'ctx-wiz-iac-warning' --style 'warning'

plugin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ configuration:
1414
enum:
1515
- docker
1616
- iac
17+
annotate-success:
18+
type: boolean
1719
additionalProperties: false

0 commit comments

Comments
 (0)