Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateGradleBuildArgs(task string, imageName string, a *latest.JibArtifact, skipTests bool, ...) []string
- func GenerateMavenBuildArgs(goal string, imageName string, a *latest.JibArtifact, skipTests bool, ...) []string
- func GetBuildDefinitions(workspace string, a *latest.JibArtifact) []string
- func GetDependencies(ctx context.Context, workspace string, artifact *latest.JibArtifact) ([]string, error)
- func GetSyncDiff(ctx context.Context, workspace string, a *latest.JibArtifact, e filemon.Events) (map[string][]string, map[string][]string, error)
- func InitSync(ctx context.Context, workspace string, a *latest.JibArtifact) error
- func PluginName(t PluginType) string
- type ArtifactConfig
- type Builder
- 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 MinimumJibMavenVersion = "1.4.0"
Skaffold-Jib depends on functionality introduced with Jib-Maven 1.4.0
Variables ¶
var GradleCommand = util.CommandWrapper{Executable: "gradle", Wrapper: "gradlew"}
GradleCommand stores Gradle executable and wrapper name
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 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 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
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(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).