3838 allRuns bool
3939 numberOfRuns int
4040 runID string
41+ outputDir string
42+ nodesFlag string
4143)
4244
4345// OutputCmd represents the download command
@@ -59,6 +61,11 @@ The YAML config file should be formatted like:
5961` ,
6062 Run : func (cmd * cobra.Command , args []string ) {
6163 nodes := make (map [string ]NodeInfo , 0 )
64+ if nodesFlag != "" {
65+ for _ , node := range strings .Split (nodesFlag , "," ) {
66+ nodes [strings .ReplaceAll (node , "/" , "-" )] = NodeInfo {ToFetch : true , Found : false }
67+ }
68+ }
6269
6370 path := util .FormatPath ()
6471 if path == "" {
@@ -147,6 +154,9 @@ The YAML config file should be formatted like:
147154 return
148155 }
149156
157+ if outputDir != "" {
158+ path = outputDir
159+ }
150160 for _ , run := range runs {
151161 if run .Status == "SCHEDULED" {
152162 continue
@@ -161,6 +171,8 @@ func init() {
161171 OutputCmd .Flags ().BoolVar (& allRuns , "all" , false , "Download output data for all runs" )
162172 OutputCmd .Flags ().IntVar (& numberOfRuns , "runs" , 1 , "Number of recent runs which outputs should be downloaded" )
163173 OutputCmd .Flags ().StringVar (& runID , "run" , "" , "Download output data of a specific run" )
174+ OutputCmd .Flags ().StringVar (& outputDir , "output-dir" , "" , "Path to directory which should be used to store outputs" )
175+ OutputCmd .Flags ().StringVar (& nodesFlag , "nodes" , "" , "A comma-separated list of nodes whose outputs should be downloaded" )
164176}
165177
166178func DownloadRunOutput (run * types.Run , nodes map [string ]NodeInfo , version * types.WorkflowVersionDetailed , destinationPath string ) {
0 commit comments