runner

package
v1.2.15 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildArgumentsProvider

type BuildArgumentsProvider struct {
	Arguments []string
}

func NewBuildArgumentsProvider

func NewBuildArgumentsProvider(defaultArguments ...string) (BuildArgumentsProvider, error)

type BuiltArtifactProvider

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

BuiltArtifactProvider returns the artifact built as part of running a build system.

func NewBuiltArtifactProvider

func NewBuiltArtifactProvider(defaultTarget ...string) BuiltArtifactProvider

NewBuiltArtifactProvider creates a new instance using the default target if not otherwise configured.

func (BuiltArtifactProvider) Get

Get returns the built artifact if exactly one exists. If less than or more than one exists, returns an error.

type CompiledApplication

type CompiledApplication struct {
	// JavaVersion is the version of Java used to compile the application.
	JavaVersion string `toml:"java-version"`

	// Sources is metadata about the source files used to compile the application.
	Sources Sources `toml:"sources"`
}

CompiledApplication represents metadata about a compiled application.

func NewCompiledApplication

func NewCompiledApplication(application application.Application, runner runner.Runner, logger logger.Logger) (CompiledApplication, error)

func (CompiledApplication) Identity

func (c CompiledApplication) Identity() (string, string)

Identity makes CompiledApplication satisfy the Identifiable interface.

type Runner

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

Runner represents the behavior of running the build system command to build an application.

func NewGradleRunner

func NewGradleRunner(build build.Build, buildSystem buildsystem.BuildSystem) (Runner, error)

NewRunner creates a new Gradle Runner instance.

func NewMavenRunner

func NewMavenRunner(build build.Build, buildSystem buildsystem.BuildSystem) (Runner, error)

NewRunner creates a new Maven Runner instance.

func NewRunner

func NewRunner(build build.Build, bin string, buildArgumentsProvider BuildArgumentsProvider, builtArtifactProvider BuiltArtifactProvider) Runner

func (Runner) Contribute

func (r Runner) Contribute() error

Contributes builds the application from source code, removes the source code, and expands the built artifact to $APPLICATION_ROOT.

type Source added in v1.1.0

type Source struct {
	// Path is the path of the source file.
	Path string `toml:"path"`

	// Mode is the human-readable mode of the source file.
	Mode string `toml:"mode"`

	// SHA256 is the hash of the source file.
	SHA256 string `toml:"sha256"`
}

Source is metadata about a source file.

func NewSource added in v1.1.0

func NewSource(path string, info os.FileInfo, logger logger.Logger) (Source, error)

type Sources added in v1.1.0

type Sources []Source

Sources a collection of Source in order to add additional functionality.

func (Sources) Len added in v1.1.0

func (s Sources) Len() int

Len makes Sources satisfy the sort.Interface interface.

func (Sources) Less added in v1.1.0

func (s Sources) Less(i, j int) bool

Less makes Sources satisfy the sort.Interface interface.

func (Sources) Swap added in v1.1.0

func (s Sources) Swap(i int, j int)

Swap makes Sources satisfy the sort.Interface interface.

Jump to

Keyboard shortcuts

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