Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateGradleBuildArgs(task, imageName string, a *latest.JibArtifact, platforms platform.Matcher, ...) []string
- func GenerateMavenBuildArgs(goal, imageName string, a *latest.JibArtifact, platforms platform.Matcher, ...) []string
- func GetBuildDefinitions(workspace string, a *latest.JibArtifact) []string
- func GetDependencies(ctx context.Context, workspace string, artifact *latest.JibArtifact) ([]string, error)
- func PluginName(t PluginType) string
- type ArtifactConfig
- type ArtifactResolver
- type Builder
- type Config
- type JSONSyncEntry
- type JSONSyncMap
- type PluginType
- type SyncEntry
- type SyncMap
Constants ¶
const MinimumJibGradleVersion = "1.4.0"
Skaffold-Jib depends on functionality introduced with Jib-Gradle 1.4.0
const MinimumJibGradleVersionForCrossPlatform = "3.2.0"
const MinimumJibGradleVersionForSync = "2.0.0"
const MinimumJibMavenVersion = "1.4.0"
Skaffold-Jib depends on functionality introduced with Jib-Maven 1.4.0
const MinimumJibMavenVersionForCrossPlatform = "3.2.0"
const MinimumJibMavenVersionForSync = "2.0.0"
Variables ¶
var GetSyncDiff = getSyncDiff
var GradleCommand = util.CommandWrapper{Executable: "gradle", Wrapper: "gradlew"}
GradleCommand stores Gradle executable and wrapper name
var InitSync = initSync
var (
// JVMFound is replaceable for testing
JVMFound = jvmFound
)
var MavenCommand = util.CommandWrapper{Executable: "mvn", Wrapper: "mvnw"}
MavenCommand stores Maven executable and wrapper name
var (
Validate = validate
)
For testing
Functions ¶
func GenerateGradleBuildArgs ¶ added in v1.2.0
func GenerateGradleBuildArgs(task, imageName string, a *latest.JibArtifact, platforms platform.Matcher, skipTests, pushImages bool, deps []*latest.ArtifactDependency, r ArtifactResolver, insecureRegistries map[string]bool, showColors 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, imageName string, a *latest.JibArtifact, platforms platform.Matcher, skipTests, pushImages bool, deps []*latest.ArtifactDependency, r ArtifactResolver, insecureRegistries map[string]bool, showColors 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 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) ArtifactType ¶ added in v1.6.0
func (c ArtifactConfig) ArtifactType(_ string) latest.ArtifactType
ArtifactType returns the type of the artifact to be built.
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
type ArtifactResolver ¶ added in v1.7.1
ArtifactResolver provides an interface to resolve built artifact tags by image name.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a builder for jib artifacts
func NewArtifactBuilder ¶
func NewArtifactBuilder(localDocker docker.LocalDaemon, cfg docker.Config, pushImages, skipTests bool, r ArtifactResolver) *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, platforms platform.Matcher) (string, error)
Build builds an artifact with Jib.
func (*Builder) SupportedPlatforms ¶ added in v1.36.0
type JSONSyncEntry ¶ added in v1.3.0
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(ctx context.Context, 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).