jib

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const MinimumJibGradleVersion = "1.4.0"

Skaffold-Jib depends on functionality introduced with Jib-Gradle 1.4.0

View Source
const MinimumJibMavenVersion = "1.4.0"

Skaffold-Jib depends on functionality introduced with Jib-Maven 1.4.0

Variables

View Source
var GradleCommand = util.CommandWrapper{Executable: "gradle", Wrapper: "gradlew"}

GradleCommand stores Gradle executable and wrapper name

View Source
var MavenCommand = util.CommandWrapper{Executable: "mvn", Wrapper: "mvnw"}

MavenCommand stores Maven executable and wrapper name

View Source
var (
	Validate = validate
)

For testing

Functions

func GenerateGradleBuildArgs added in v1.2.0

func GenerateGradleBuildArgs(task string, imageName string, a *latest.JibArtifact, skipTests bool, insecureRegistries map[string]bool) []string

GenerateGradleBuildArgs generates the arguments to Gradle for building the project as an image.

func GenerateMavenBuildArgs added in v1.2.0

func GenerateMavenBuildArgs(goal string, imageName string, a *latest.JibArtifact, skipTests bool, insecureRegistries map[string]bool) []string

GenerateMavenBuildArgs generates the arguments to Maven for building the project as an image.

func GetBuildDefinitions added in v1.2.0

func GetBuildDefinitions(workspace string, a *latest.JibArtifact) []string

func GetDependencies

func GetDependencies(ctx context.Context, workspace string, artifact *latest.JibArtifact) ([]string, error)

GetDependencies returns a list of files to watch for changes to rebuild

func GetSyncDiff added in v1.3.0

func GetSyncDiff(ctx context.Context, workspace string, a *latest.JibArtifact, e filemon.Events) (map[string][]string, map[string][]string, error)

returns toCopy, toDelete, error

func InitSync added in v1.3.0

func InitSync(ctx context.Context, workspace string, a *latest.JibArtifact) error

func PluginName

func PluginName(t PluginType) string

Name provides a human-oriented label for a plugin type.

Types

type ArtifactConfig added in v1.2.0

type ArtifactConfig struct {
	BuilderName string `json:"-"`
	Image       string `json:"image,omitempty"`
	File        string `json:"path,omitempty"`
	Project     string `json:"project,omitempty"`
}

ArtifactConfig holds information about a Jib project

func (ArtifactConfig) ConfiguredImage added in v1.2.0

func (c ArtifactConfig) ConfiguredImage() string

ConfiguredImage returns the target image configured by the builder, or empty string if no image is configured

func (ArtifactConfig) Describe added in v1.2.0

func (c ArtifactConfig) Describe() string

Describe returns the initBuilder's string representation, used when prompting the user to choose a builder.

func (ArtifactConfig) Name added in v1.2.0

func (c ArtifactConfig) Name() string

Name returns the name of the builder

func (ArtifactConfig) Path added in v1.2.0

func (c ArtifactConfig) Path() string

Path returns the path to the build definition

func (ArtifactConfig) UpdateArtifact added in v1.2.0

func (c ArtifactConfig) UpdateArtifact(a *latest.Artifact)

CreateArtifact creates an Artifact to be included in the generated Build Config

type Builder

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

Builder is a builder for jib artifacts

func NewArtifactBuilder

func NewArtifactBuilder(localDocker docker.LocalDaemon, insecureRegistries map[string]bool, pushImages, skipTests bool) *Builder

NewArtifactBuilder returns a new customjib artifact builder

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, out io.Writer, artifact *latest.Artifact, tag string) (string, error)

Build builds an artifact with Jib.

type JSONSyncEntry added in v1.3.0

type JSONSyncEntry struct {
	Src  string `json:"src"`
	Dest string `json:"dest"`
}

type JSONSyncMap added in v1.3.0

type JSONSyncMap struct {
	Direct    []JSONSyncEntry `json:"direct"`
	Generated []JSONSyncEntry `json:"generated"`
}

type PluginType

type PluginType string

PluginType defines the different supported Jib plugins.

const (
	JibMaven  PluginType = "maven"
	JibGradle PluginType = "gradle"
)

func DeterminePluginType

func DeterminePluginType(workspace string, artifact *latest.JibArtifact) (PluginType, error)

DeterminePluginType tries to determine the Jib plugin type for the given artifact.

func (PluginType) IsKnown

func (t PluginType) IsKnown() bool

IsKnown checks that the num value is a known value (vs 0 or an unknown value).

type SyncEntry added in v1.3.0

type SyncEntry struct {
	Dest     []string
	FileTime time.Time
	IsDirect bool
}

type SyncMap added in v1.3.0

type SyncMap map[string]SyncEntry

Jump to

Keyboard shortcuts

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