build

package
v0.0.0-...-295d36a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 37 Imported by: 0

Documentation

Overview

Package build orchestrates builds in the trusted host environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyVolume

func CopyVolume(ctx context.Context, src, dst string) error

func CreateVolume

func CreateVolume(ctx context.Context, path string, sizeMB int) error

func RenderReport

func RenderReport(r *types.Report) (string, error)

func RenderReports

func RenderReports(reports map[string]*types.Report) (string, error)

func TempFile

func TempFile(dir, pattern string) (string, error)

Types

type Builder

type Builder struct {
	OutputDir string
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(log logr.Logger, cloner *GitCloner, vm *Firecracker, outputDir string) (*Builder, error)

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, params *Params) (*Result, error)

func (*Builder) Cleanup

func (b *Builder) Cleanup(p *Params) error

type Clone

type Clone struct {
	VolumePath string
	Snapshot   *proxy.Snapshot
	Config     *proxy.Config
}

type Firecracker

type Firecracker struct {
	// contains filtered or unexported fields
}

func NewFirecracker

func NewFirecracker(l logr.Logger) *Firecracker

func (*Firecracker) BootVM

func (f *Firecracker) BootVM(ctx context.Context, inVolume, outVolume, buildTmp string, out io.Writer) error

type GitCloner

type GitCloner struct {
	// contains filtered or unexported fields
}

func NewGitCloner

func NewGitCloner(log logr.Logger, gh *github.Client, tokenSource TokenSource, cloneDir string) *GitCloner

func (*GitCloner) Clone

func (g *GitCloner) Clone(ctx context.Context, owner, repo, commit string) (*Clone, error)

type MountedVolume

type MountedVolume string

func MountVolume

func MountVolume(ctx context.Context, volume, dir string) (MountedVolume, error)

func (MountedVolume) Close

func (m MountedVolume) Close(ctx context.Context) error

func (MountedVolume) Path

func (m MountedVolume) Path() string

type Params

type Params struct {
	Owner    string
	Repo     string
	Ref      string
	Hermetic bool
}

type Pusher

type Pusher struct {
	// contains filtered or unexported fields
}

func NewPusher

func NewPusher(ctx context.Context, log logr.Logger, docker *client.Client, secret, outputDir string) (*Pusher, error)

func (*Pusher) Push

func (p *Pusher) Push(ctx context.Context, params *Params) error

type Result

type Result struct {
	Snapshot *proxy.Snapshot
	Summary  string
	Output   string
}

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner(log logr.Logger, containerd *containerd.Client, outputDir string) *Scanner

func (*Scanner) Scan

func (s *Scanner) Scan(ctx context.Context, targetImage string) (*types.Report, error)

func (*Scanner) ScanBuildOutput

func (s *Scanner) ScanBuildOutput(ctx context.Context, params *Params) (*types.Report, error)

type TokenSource

type TokenSource func(context.Context) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL