@@ -12,6 +12,7 @@ import (
12
12
"time"
13
13
14
14
"github.com/gitpod-io/leeway/pkg/leeway"
15
+ "github.com/gitpod-io/leeway/pkg/remotereporter"
15
16
"github.com/gookit/color"
16
17
log "github.com/sirupsen/logrus"
17
18
"github.com/spf13/cobra"
@@ -173,6 +174,7 @@ func addBuildFlags(cmd *cobra.Command) {
173
174
cmd .Flags ().String ("coverage-output-path" , "" , "Output path where test coverage file will be copied after running tests" )
174
175
cmd .Flags ().StringToString ("docker-build-options" , nil , "Options passed to all 'docker build' commands" )
175
176
cmd .Flags ().String ("report" , "" , "Generate a HTML report after the build has finished. (e.g. --report myreport.html)" )
177
+ cmd .Flags ().String ("remote-report" , "" , "Report the build progress to a remote endoint" )
176
178
}
177
179
178
180
func getBuildOpts (cmd * cobra.Command ) ([]leeway.BuildOption , * leeway.FilesystemCache ) {
@@ -249,6 +251,11 @@ func getBuildOpts(cmd *cobra.Command) ([]leeway.BuildOption, *leeway.FilesystemC
249
251
} else if report != "" {
250
252
reporter = append (reporter , leeway .NewHTMLReporter (report ))
251
253
}
254
+ if ep , err := cmd .Flags ().GetString ("remote-report" ); err != nil {
255
+ log .Fatal (err )
256
+ } else if ep != "" {
257
+ reporter = append (reporter , remotereporter .NewReporter (ep ))
258
+ }
252
259
253
260
dontTest , err := cmd .Flags ().GetBool ("dont-test" )
254
261
if err != nil {
0 commit comments