Versions in this module Expand all Collapse all v1 v1.0.0 Apr 28, 2022 Changes in this version + const BuildinArgGitCommit + const BuiltinArgPackageVersion + const EnvvarBuildDir + const EnvvarCacheDir + const EnvvarYarnMutex + const ProvenanceBuilderID + var ErrNoAttestationBundle error = fmt.Errorf("no attestation bundle found") + func AccessAttestationBundleInCachedArchive(fn string, handler func(bundle io.Reader) error) (err error) + func Build(pkg *Package, opts ...BuildOption) (err error) + func CopyApplication(dst string, application *Application, strict bool) error + func DeleteNonApplicationFiles(dst string, application *Application, strict bool) (err error) + func FindUnresolvedArguments(pkg *Package) ([]string, error) + func FormatBUILDyaml(out io.Writer, in io.Reader, fixIssues bool) error + func TopologicalSort(pkgs []*Package) + func WatchSources(ctx context.Context, pkgs []*Package) (changed <-chan string, errs <-chan error) + type Application struct + ArgumentDefaults map[string]string + Components map[string]*Component + DefaultTarget string + DefaultVariant *PackageVariant + EnvironmentManifest EnvironmentManifest + Git GitInfo + Origin string + Packages map[string]*Package + Provenance ApplicationProvenance + Scripts map[string]*Script + SelectedVariant *PackageVariant + Variants []*PackageVariant + func FindApplication(path string, args Arguments, variant, provenanceKey string) (Application, error) + func FindNestedApplications(path string, args Arguments, variant string) (res Application, err error) + func (ba *Application) ShouldIgnoreComponent(path string) bool + func (ba *Application) ShouldIgnoreSource(path string) bool + type ApplicationProvenance struct + Enabled bool + KeyPath string + SLSA bool + type Arguments map[string]string + type AttestationBundle struct + func (a *AttestationBundle) Add(env *provenance.Envelope) error + func (a *AttestationBundle) AddFromBundle(other io.Reader) error + func (a *AttestationBundle) Len() int + type BuildOption func(*buildOptions) error + func WithAdditionalRemoteCaches(caches []RemoteCache) BuildOption + func WithBuildPlan(out io.Writer) BuildOption + func WithCoverageOutputPath(output string) BuildOption + func WithDockerBuildOptions(dockerBuildOpts *DockerBuildOptions) BuildOption + func WithDontRetag(dontRetag bool) BuildOption + func WithDontTest(dontTest bool) BuildOption + func WithDryRun(dryrun bool) BuildOption + func WithLocalCache(cache Cache) BuildOption + func WithMaxConcurrentTasks(n int64) BuildOption + func WithRemoteCache(cache RemoteCache) BuildOption + func WithReporter(reporter Reporter) BuildOption + type Cache interface + Location func(pkg *Package) (path string, exists bool) + type CacheLevel string + const CacheLocal + const CacheNone + const CacheRemote + const CacheRemotePull + const CacheRemotePush + const CacheUnspecified + func (c *CacheLevel) UnmarshalYAML(unmarshal func(interface{}) error) (err error) + func (c CacheLevel) RemoteDownload() bool + func (c CacheLevel) RemoteUpload() bool + type Component struct + Constants Arguments + Name string + Origin string + Packages []*Package + Scripts []*Script + W *Application + func (c *Component) Git() *GitInfo + type ConsoleReporter struct + func NewConsoleReporter() *ConsoleReporter + func (r *ConsoleReporter) BuildFinished(pkg *Package, err error) + func (r *ConsoleReporter) BuildStarted(pkg *Package, status map[*Package]PackageBuildStatus) + func (r *ConsoleReporter) PackageBuildFinished(pkg *Package, err error) + func (r *ConsoleReporter) PackageBuildLog(pkg *Package, isErr bool, buf []byte) + func (r *ConsoleReporter) PackageBuildStarted(pkg *Package) + type DockerBuildOptions map[string]string + type DockerPkgConfig struct + BuildArgs map[string]string + Dockerfile string + Image []string + Metadata map[string]string + Squash bool + func (cfg DockerPkgConfig) AdditionalSources() []string + type EnvironmentManifest []EnvironmentManifestEntry + func (mf EnvironmentManifest) Hash() (string, error) + func (mf EnvironmentManifest) MarshalJSON() ([]byte, error) + func (mf EnvironmentManifest) Write(out io.Writer) error + type EnvironmentManifestEntry struct + Builtin bool + Command []string + Name string + Value string + type FilesystemCache struct + Origin string + func NewFilesystemCache(location string) (*FilesystemCache, error) + func (fsc *FilesystemCache) Location(pkg *Package) (path string, exists bool) + type GSUtilRemoteCache struct + BucketName string + func (rs GSUtilRemoteCache) Download(dst Cache, pkgs []*Package) error + func (rs GSUtilRemoteCache) Upload(src Cache, pkgs []*Package) error + type GenericPkgConfig struct + Commands [][]string + DontTest bool + Test [][]string + func (cfg GenericPkgConfig) AdditionalSources() []string + type GitInfo struct + Commit string + Dirty bool + Origin string + func GetGitInfo(loc string) (*GitInfo, error) + type GoPackaging string + const GoApp + const GoLibrary + type GoPkgConfig struct + BuildCommand []string + BuildFlags []string + DontCheckGoFmt bool + DontLint bool + DontTest bool + Generate bool + GoKart struct{ ... } + GoVersion string + LintCommand []string + Packaging GoPackaging + func (cfg GoPkgConfig) AdditionalSources() []string + func (cfg GoPkgConfig) Validate() error + type GorpaReporter struct + func NewGorpaReporter() *GorpaReporter + func (r *GorpaReporter) BuildStarted(pkg *Package, status map[*Package]PackageBuildStatus) + func (r *GorpaReporter) PackageBuildFinished(pkg *Package, err error) + type MinioRemoteCache struct + BucketName string + func (rs MinioRemoteCache) Download(dst Cache, pkgs []*Package) error + func (rs MinioRemoteCache) Upload(src Cache, pkgs []*Package) error + type NoRemoteCache struct + func (NoRemoteCache) Download(dst Cache, pkgs []*Package) error + func (NoRemoteCache) Upload(src Cache, pkgs []*Package) error + type Package struct + C *Component + Config PackageConfig + Definition []byte + func (p *Package) BuildLayoutLocation(dependency *Package) (loc string) + func (p *Package) ContentManifest() ([]string, error) + func (p *Package) DefinitionHash() (string, error) + func (p *Package) FilesystemSafeName() string + func (p *Package) FullName() string + func (p *Package) GetDependencies() []*Package + func (p *Package) GetTransitiveDependencies() []*Package + func (p *Package) UnmarshalYAML(unmarshal func(interface{}) error) error + func (p *Package) Version() (string, error) + func (p *Package) WriteVersionManifest(out io.Writer) error + type PackageBuildStatus string + const PackageBuilding + const PackageBuilt + const PackageNotBuiltYet + type PackageConfig interface + AdditionalSources func() []string + type PackageNotFoundErr struct + Package string + func (n PackageNotFoundErr) Error() string + type PackageType string + const DeprecatedTypescriptPackage + const DockerPackage + const GenericPackage + const GoPackage + const YarnPackage + func (p *PackageType) UnmarshalYAML(unmarshal func(interface{}) error) (err error) + type PackageVariant struct + func (v *PackageVariant) Config(t PackageType) (cfg PackageConfig, ok bool) + func (v *PackageVariant) ExcludeComponent(name string) bool + func (v *PackageVariant) ResolveSources(application *Application, loc string) (incl []string, excl []string, err error) + func (v *PackageVariant) UnmarshalYAML(unmarshal func(interface{}) error) error + type PkgNotBuiltErr struct + Package *Package + func (p PkgNotBuiltErr) Error() string + type RemoteCache interface + Download func(dst Cache, pkgs []*Package) error + Upload func(src Cache, pkgs []*Package) error + type Reporter interface + BuildFinished func(pkg *Package, err error) + BuildStarted func(pkg *Package, status map[*Package]PackageBuildStatus) + PackageBuildFinished func(pkg *Package, err error) + PackageBuildLog func(pkg *Package, isErr bool, buf []byte) + PackageBuildStarted func(pkg *Package) + type Script struct + C *Component + Dependencies []string + Description string + Environment []string + Name string + Script string + Type ScriptType + WorkdirLayout WorkdirLayout + func (p *Script) FilesystemSafeName() string + func (p *Script) FullName() string + func (p *Script) GetDependencies() []*Package + func (p *Script) Run(opts ...BuildOption) error + type ScriptType string + const BashScript + type WorkdirLayout string + const WorkdirOrigin + const WorkdirPackages + type YarnPackaging string + const YarnApp + const YarnArchive + const YarnLibrary + const YarnOfflineMirror + type YarnPkgConfig struct + Commands struct{ ... } + DontTest bool + Packaging YarnPackaging + TSConfig string + YarnLock string + func (cfg YarnPkgConfig) AdditionalSources() []string + func (cfg YarnPkgConfig) Validate() error