@@ -12,6 +12,7 @@ import (
1212 "time"
1313
1414 "github.com/gitpod-io/leeway/pkg/leeway"
15+ "github.com/gitpod-io/leeway/pkg/remotereporter"
1516 "github.com/gookit/color"
1617 log "github.com/sirupsen/logrus"
1718 "github.com/spf13/cobra"
@@ -173,6 +174,7 @@ func addBuildFlags(cmd *cobra.Command) {
173174 cmd .Flags ().String ("coverage-output-path" , "" , "Output path where test coverage file will be copied after running tests" )
174175 cmd .Flags ().StringToString ("docker-build-options" , nil , "Options passed to all 'docker build' commands" )
175176 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" )
176178}
177179
178180func getBuildOpts (cmd * cobra.Command ) ([]leeway.BuildOption , * leeway.FilesystemCache ) {
@@ -249,6 +251,11 @@ func getBuildOpts(cmd *cobra.Command) ([]leeway.BuildOption, *leeway.FilesystemC
249251 } else if report != "" {
250252 reporter = append (reporter , leeway .NewHTMLReporter (report ))
251253 }
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+ }
252259
253260 dontTest , err := cmd .Flags ().GetBool ("dont-test" )
254261 if err != nil {
0 commit comments