diff options
author | Héctor Orón Martínez <zumbi@debian.org> | 2018-11-06 17:39:01 +0100 |
---|---|---|
committer | Héctor Orón Martínez <zumbi@debian.org> | 2018-11-06 17:39:01 +0100 |
commit | 1d3663fc3a861188bbf4343d1ffe5767e9815c57 (patch) | |
tree | a6ef971537c9531585a19df1c9849daf192b26ae /actions/run_action.go | |
parent | a3819b2c8c823955bb053d5a34da27c94aef4d47 (diff) |
New upstream version 1.0.0+git20181105.b02e058
Diffstat (limited to 'actions/run_action.go')
-rw-r--r-- | actions/run_action.go | 9 |
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...) |