Documentation
¶
Overview ¶
Package buildsource prepares pinned build inputs and checks build reuse.
Git-backed component and sandbox flow:
Ref -> pinned commit -> configured directory's tree/blob ID
|
Compare source + build config
with a verified successful build
|
+--------------------+--------------------+
| |
Unchanged Changed / insufficient evidence
| |
Reuse build Runner checkout at pinned commit
|
sourceidentity.Verify
|
Build tools
Selection uses cached Git metadata, not checkouts or blob downloads. The runner verifies its checkout against the directory's tree and reports every path outside the directory that the build read through sourcefs; the build records each path's Git entry, and reuse requires the directory and every recorded entry to be unchanged.
Index ¶
- func Component(ctx context.Context, db *gorm.DB, vcs *vcshelpers.Helpers, ...) (*sourceidentity.Identity, error)
- func ComponentChecksum(c *app.ComponentConfigConnection) (string, error)
- func ComponentInputs(c *app.ComponentConfigConnection) (*plantypes.BuildPlan, error)
- func DirectoryChanged(ctx context.Context, vcs *vcshelpers.Helpers, ...) (bool, error)
- func GitSource(ctx context.Context, vcs *vcshelpers.Helpers, ...) (*plantypes.GitSource, error)
- func PreloadConnection(db *gorm.DB) *gorm.DB
- func ReportedSource(ctx context.Context, db *gorm.DB, vcs *vcshelpers.Helpers, l *zap.Logger, ...) *sourceidentity.Identity
- func ResolveRef(ctx context.Context, db *gorm.DB, vcs *vcshelpers.Helpers, ...) (string, error)
- func SameRepo(a, b string) bool
- func Sandbox(ctx context.Context, db *gorm.DB, vcs *vcshelpers.Helpers, ...) (*sourceidentity.Identity, error)
- func SandboxChecksum(c *app.AppSandboxConfig) string
- func SandboxInputs(c *app.AppSandboxConfig) *plantypes.TerraformBuildPlan
- func SaveComponent(ctx context.Context, db *gorm.DB, id string, identity *sourceidentity.Identity) (*sourceidentity.Identity, error)
- func SaveSandbox(ctx context.Context, db *gorm.DB, id string, identity *sourceidentity.Identity) (*sourceidentity.Identity, error)
- func SourcesEqual(ctx context.Context, vcs *vcshelpers.Helpers, ...) (bool, error)
- func StoredIdentity(sourceChecksum string, i *sourceidentity.Identity) *sourceidentity.Identity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Component ¶
func Component(ctx context.Context, db *gorm.DB, vcs *vcshelpers.Helpers, b *app.ComponentBuild) (*sourceidentity.Identity, error)
func ComponentChecksum ¶
func ComponentChecksum(c *app.ComponentConfigConnection) (string, error)
func ComponentInputs ¶
func ComponentInputs(c *app.ComponentConfigConnection) (*plantypes.BuildPlan, error)
func DirectoryChanged ¶
func DirectoryChanged(ctx context.Context, vcs *vcshelpers.Helpers, connected *app.ConnectedGithubVCSConfig, public *app.PublicGitVCSConfig, root, baseSHA, headSHA string) (bool, error)
func GitSource ¶
func GitSource(ctx context.Context, vcs *vcshelpers.Helpers, connected *app.ConnectedGithubVCSConfig, public *app.PublicGitVCSConfig, i *sourceidentity.Identity) (*plantypes.GitSource, error)
func ReportedSource ¶
func ReportedSource(ctx context.Context, db *gorm.DB, vcs *vcshelpers.Helpers, l *zap.Logger, job *app.RunnerJob, success bool, i *sourceidentity.Identity, reads *sourceidentity.Reads) *sourceidentity.Identity
func ResolveRef ¶
func ResolveRef(ctx context.Context, db *gorm.DB, vcs *vcshelpers.Helpers, connected *app.ConnectedGithubVCSConfig, public *app.PublicGitVCSConfig, runID, ref string) (string, error)
func Sandbox ¶
func Sandbox(ctx context.Context, db *gorm.DB, vcs *vcshelpers.Helpers, b *app.AppSandboxBuild) (*sourceidentity.Identity, error)
func SandboxChecksum ¶
func SandboxChecksum(c *app.AppSandboxConfig) string
func SandboxInputs ¶
func SandboxInputs(c *app.AppSandboxConfig) *plantypes.TerraformBuildPlan
func SaveComponent ¶
func SaveComponent(ctx context.Context, db *gorm.DB, id string, identity *sourceidentity.Identity) (*sourceidentity.Identity, error)
func SaveSandbox ¶
func SaveSandbox(ctx context.Context, db *gorm.DB, id string, identity *sourceidentity.Identity) (*sourceidentity.Identity, error)
func SourcesEqual ¶
func SourcesEqual(ctx context.Context, vcs *vcshelpers.Helpers, connected *app.ConnectedGithubVCSConfig, public *app.PublicGitVCSConfig, before, after *sourceidentity.Identity) (bool, error)
func StoredIdentity ¶
func StoredIdentity(sourceChecksum string, i *sourceidentity.Identity) *sourceidentity.Identity
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.