summaryrefslogtreecommitdiff
path: root/actions/run_action.go
diff options
context:
space:
mode:
Diffstat (limited to 'actions/run_action.go')
-rw-r--r--actions/run_action.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/actions/run_action.go b/actions/run_action.go
index c6115cc..7bae989 100644
--- a/actions/run_action.go
+++ b/actions/run_action.go
@@ -10,6 +10,7 @@ Yaml syntax:
postprocess: bool
script: script name
command: command line
+ label: string
Properties 'command' and 'script' are mutually exclusive.
@@ -26,6 +27,9 @@ access to the filesystem ($ROOTDIR), the image if any ($IMAGE), the
recipe directory ($RECIPEDIR) and the artifact directory ($ARTIFACTDIR).
In both cases it is run with root privileges.
+- label -- if non-empty, this string is used to label output. If empty,
+a label is derived from the command or script.
+
- postprocess -- if set script or command is executed after all other commands and
has access to the image file.
@@ -49,6 +53,7 @@ type RunAction struct {
PostProcess bool
Script string
Command string
+ Label string
}
func (run *RunAction) Verify(context *debos.DebosContext) error {
@@ -103,6 +108,10 @@ func (run *RunAction) doRun(context debos.DebosContext) error {
label = run.Command
}
+ if run.Label != "" {
+ label = run.Label
+ }
+
// Command/script with options passed as single string
cmdline = append([]string{"sh", "-c"}, cmdline...)