--- a/podman/run.go Wed Dec 22 10:18:10 2021 -0600
+++ b/podman/run.go Wed Dec 22 10:30:52 2021 -0600
@@ -90,7 +90,12 @@
- // if the user provided a script, generate the file and set all of our
+ // If there was a --cpu-shares specified on the command line add it now. + if rt.CpuShares != "" { + generator.Append("--cpu-shares", rt.CpuShares) + // If the user provided a script, generate the file and set all of our // attributes appropriately.
// Overwrite any entry point that the user provided. Validate set
--- a/runner/cmd.go Wed Dec 22 10:18:10 2021 -0600
+++ b/runner/cmd.go Wed Dec 22 10:30:52 2021 -0600
@@ -21,6 +21,7 @@
ConfigFile string `kong:"flag,help='The config file to load',placeholder='FILE',short='f',default='convey.yml',name='config'"`
+ CpuShares string `king:"flag,help='The amount of cpu shares given to run tasks',placeholder='CPU-SHARES',short='c'"` ForceSequential bool `kong:"flag,help='Force concurrent stages to be ran sequentially',short='S',default='false'"`
KeepWorkspace bool `kong:"flag,help='Keep the workspace directory after running',default='false'"`
Timeout time.Duration `kong:"flag,help='The maximum amount of time a plan can run. 0 to disable. Units must be specified.',placeholder='DURATION',default='15m'"`
@@ -44,6 +45,10 @@
rt := runtime.New(env, configPath, c.ForceSequential, c.KeepWorkspace, c.Timeout)
+ rt.CpuShares = c.CpuShares configEnv := environment.New(cfg.Environment...)
return plan.Execute(name, cfg.Tasks, configEnv, rt)
--- a/runtime/runtime.go Wed Dec 22 10:18:10 2021 -0600
+++ b/runtime/runtime.go Wed Dec 22 10:30:52 2021 -0600
@@ -32,7 +32,9 @@