go.fuchsia.dev/infra@v0.0.0-20240507153436-9b593402251b/cmd/artifacts/main.go (about) 1 // Copyright 2019 The Fuchsia Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // This tool provides access to the set of outputs generated by Fuchsia CI builds. Build 6 // output directories are referenced by build id. 7 // 8 // Example usage: 9 // 10 // $ artifacts ls -build=123 11 // $ artifacts cp -build=123 -src=packages.tar.gz -dst=local/packages.tar.gz 12 // $ artifacts storetestoutputs -build=123 -testenv=TEST_ENV outputs.json 13 14 package main 15 16 import ( 17 "context" 18 "flag" 19 "os" 20 21 "github.com/google/subcommands" 22 ) 23 24 func main() { 25 subcommands.Register(subcommands.HelpCommand(), "") 26 subcommands.Register(subcommands.CommandsCommand(), "") 27 subcommands.Register(subcommands.FlagsCommand(), "") 28 subcommands.Register(&ListCommand{}, "") 29 subcommands.Register(&CopyCommand{}, "") 30 subcommands.Register(&StoreTestOutputsCommand{}, "") 31 32 flag.Parse() 33 os.Exit(int(subcommands.Execute(context.Background()))) 34 }