Documentation
¶
Index ¶
- Constants
- Variables
- func CalculateDependencies(stages []config.KanikoStage, opts *config.KanikoOptions) (map[int][]string, error)
- func CheckPushPermissions(opts *config.KanikoOptions) error
- func DoBuild(opts *config.KanikoOptions) (image v1.Image, retErr error)
- func DoPush(image v1.Image, opts *config.KanikoOptions) error
- func LoadImage(path string) (v1.Image, error)
- func RenderStages(stages []config.KanikoStage, cacheInfo []*stageCacheInfo, ...) (retErr error)
- type CompositeCache
Constants ¶
const ( UpstreamClientUaKey = "UPSTREAM_CLIENT_TYPE" DummyDestination = "docker.io/unset-repo/unset-image-name" )
Variables ¶
var (
DummyDestinations = []string{DummyDestination}
)
for testing
var (
NewLayerCache = newLayerCacheImpl
)
for testing
var (
Out io.Writer = os.Stdout
)
for testing
Functions ¶
func CalculateDependencies ¶
func CalculateDependencies(stages []config.KanikoStage, opts *config.KanikoOptions) (map[int][]string, error)
func CheckPushPermissions ¶
func CheckPushPermissions(opts *config.KanikoOptions) error
CheckPushPermissions checks that the configured credentials can be used to push to every specified destination.
func DoBuild ¶
func DoBuild(opts *config.KanikoOptions) (image v1.Image, retErr error)
DoBuild executes building the Dockerfile
func DoPush ¶
func DoPush(image v1.Image, opts *config.KanikoOptions) error
DoPush is responsible for pushing image to the destinations specified in opts. A dummy destination would be set when --no-push is set to true and --tar-path is not empty with empty --destinations.
func RenderStages ¶ added in v1.26.6
func RenderStages(stages []config.KanikoStage, cacheInfo []*stageCacheInfo, opts *config.KanikoOptions, fileContext util.FileContext, crossStageDependencies map[int][]string) (retErr error)
Types ¶
type CompositeCache ¶
type CompositeCache struct {
// contains filtered or unexported fields
}
CompositeCache is a type that generates a cache key from a series of keys.
func NewCompositeCache ¶
func NewCompositeCache(initial ...string) *CompositeCache
NewCompositeCache returns an initialized composite cache object.
func (*CompositeCache) AddKey ¶
func (s *CompositeCache) AddKey(k ...string)
AddKey adds the specified key to the sequence.
func (*CompositeCache) AddPath ¶
func (s *CompositeCache) AddPath(p string, context util.FileContext) error
func (CompositeCache) Clone ¶ added in v1.27.3
func (s CompositeCache) Clone() CompositeCache
Clone returns an independent copy of the CompositeCache with its own backing array.
func (*CompositeCache) Hash ¶
func (s *CompositeCache) Hash() (string, error)
Hash returns the composite key in a string SHA256 format.
func (*CompositeCache) Key ¶
func (s *CompositeCache) Key() string
Key returns the human readable composite key as a string.