From 5e3184b61d6dda8f1535551e74f7cd4943b0b639 Mon Sep 17 00:00:00 2001 From: Alex Quick Date: Mon, 16 Jan 2017 23:08:02 -0500 Subject: [PATCH] [common] helper for go trigger plugn events --- plugins/common/common.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/common/common.go b/plugins/common/common.go index e124c4a68..7d0f1106e 100644 --- a/plugins/common/common.go +++ b/plugins/common/common.go @@ -144,3 +144,9 @@ func VerifyImage(image string) bool { } return false } + +//PlugnTrigger fire the given plugn trigger with the given args +func PlugnTrigger(triggerName string, args ...string) (string, error) { + res, err := sh.Command("plugn", "trigger", triggerName, args).Output() + return string(res), err +}