stack

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MixinsLabel = "io.buildpacks.stack.mixins"

Variables

This section is empty.

Functions

func FindStageMixins

func FindStageMixins(mixins []string, stage string) []string

func MergeCompatible

func MergeCompatible(stacksA []dist.Stack, stacksB []dist.Stack) []dist.Stack

MergeCompatible determines the allowable set of stacks that a combination of buildpacks may run on, given each buildpack's set of stacks. Compatibility between the two sets of buildpack stacks is defined by the following rules:

  1. The stack must be supported by both buildpacks. That is, any resulting stack ID must appear in both input sets.
  2. For each supported stack ID, all required mixins for all buildpacks must be provided by the result. That is, mixins for the stack ID in both input sets are unioned.

---

Examples:

stacksA = [{ID: "stack1", mixins: ["build:mixinA", "mixinB", "run:mixinC"]}}]
stacksB = [{ID: "stack1", mixins: ["build:mixinA", "run:mixinC"]}}]
result = [{ID: "stack1", mixins: ["build:mixinA", "mixinB", "run:mixinC"]}}]

stacksA = [{ID: "stack1", mixins: ["build:mixinA"]}}, {ID: "stack2", mixins: ["mixinA"]}}]
stacksB = [{ID: "stack1", mixins: ["run:mixinC"]}}, {ID: "stack2", mixins: ["mixinA"]}}]
result = [{ID: "stack1", mixins: ["build:mixinA", "run:mixinC"]}}, {ID: "stack2", mixins: ["mixinA"]}}]

stacksA = [{ID: "stack1", mixins: ["build:mixinA"]}}, {ID: "stack2", mixins: ["mixinA"]}}]
stacksB = [{ID: "stack2", mixins: ["mixinA", "run:mixinB"]}}]
result = [{ID: "stack2", mixins: ["mixinA", "run:mixinB"]}}]

stacksA = [{ID: "stack1", mixins: ["build:mixinA"]}}]
stacksB = [{ID: "stack2", mixins: ["mixinA", "run:mixinB"]}}]
result = []

func ValidateMixins

func ValidateMixins(buildImageName string, buildImageMixins []string, runImageName string, runImageMixins []string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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