diff --git a/pkg/api/types.go b/pkg/api/types.go index b5dc1ab62..2c400d7a4 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -238,6 +238,10 @@ type Config struct { // must have non-zero length. The labels defined here override generated labels in case // they have the same name. Labels map[string]string + + // SourceInfo provides the info about the source to be built rather than relying + // on the Downloader to retrieve it. + SourceInfo *SourceInfo } // EnvironmentSpec specifies a single environment variable. diff --git a/pkg/build/strategies/sti/sti.go b/pkg/build/strategies/sti/sti.go index e8f94a6bd..dcc233bda 100644 --- a/pkg/build/strategies/sti/sti.go +++ b/pkg/build/strategies/sti/sti.go @@ -348,6 +348,9 @@ func (builder *STI) Prepare(config *api.Config) error { ) return err } + if config.SourceInfo != nil { + builder.sourceInfo = config.SourceInfo + } } // get the scripts