Documentation
¶
Index ¶
- Constants
- type BuildNode
- type Conditions
- type ContainerNode
- type NetworkNode
- type Node
- type NodeType
- type RootNode
- func (n *RootNode) NewBuildNode(context string) *BuildNode
- func (n *RootNode) NewCacheNode() *ContainerNode
- func (n *RootNode) NewCloneNode() *ContainerNode
- func (n *RootNode) NewContainerNode() *ContainerNode
- func (n *RootNode) NewNetworkNode(name string) *NetworkNode
- func (n *RootNode) NewPluginNode() *ContainerNode
- func (n *RootNode) NewServiceNode() *ContainerNode
- func (n *RootNode) NewShellNode() *ContainerNode
- func (n *RootNode) NewVolumeNode(name string) *VolumeNode
- func (n *RootNode) Root() *RootNode
- func (n *RootNode) Walk(fn WalkFunc) (err error)
- type VolumeNode
- type WalkFunc
Constants ¶
const ( NodeBuild = "build" NodeCache = "cache" NodeClone = "clone" NodeContainer = "container" NodeNetwork = "network" NodePlugin = "plugin" NodeRoot = "root" NodeService = "service" NodeShell = "shell" NodeVolume = "volume" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildNode ¶
type BuildNode struct {
NodeType
Context string
Dockerfile string
Args map[string]string
// contains filtered or unexported fields
}
BuildNode represents Docker image build instructions.
type Conditions ¶
type ContainerNode ¶
type ContainerNode struct {
NodeType
// Container represents the container configuration.
Container runner.Container
Conditions Conditions
Disabled bool
Commands []string
Vargs map[string]interface{}
// contains filtered or unexported fields
}
ContainerNode represents a Docker container.
func (*ContainerNode) OnFailure ¶
func (n *ContainerNode) OnFailure() bool
OnFailure returns true if the container should be executed even when the exit code of the previous step != 0.
func (*ContainerNode) OnSuccess ¶
func (n *ContainerNode) OnSuccess() bool
OnSuccess returns true if the container should be executed when the exit code of the previous step is 0.
type NetworkNode ¶
type NetworkNode struct {
NodeType
Name string
Driver string
DriverOpts map[string]string
// contains filtered or unexported fields
}
NetworkNode represents a Docker network.
type NodeType ¶
type NodeType string
NodeType identifies the type of parse tree node.
type RootNode ¶
type RootNode struct {
NodeType
Platform string
Base string
Path string
Image string
Pod Node
Build Node
Cache Node
Clone Node
Script []Node
Volumes []Node
Networks []Node
Services []Node
}
RootNode is the root node in the parsed Yaml file.
func ParseString ¶
ParseString parses a Yaml string and returns a Tree structure.
func (*RootNode) NewBuildNode ¶
Returns a new Network Node.
func (*RootNode) NewCacheNode ¶
func (n *RootNode) NewCacheNode() *ContainerNode
Returns a new Container Cache Node.
func (*RootNode) NewCloneNode ¶
func (n *RootNode) NewCloneNode() *ContainerNode
Returns a new Container Clone Node.
func (*RootNode) NewContainerNode ¶
func (n *RootNode) NewContainerNode() *ContainerNode
Returns a new Container Node.
func (*RootNode) NewNetworkNode ¶
func (n *RootNode) NewNetworkNode(name string) *NetworkNode
Returns a new Network Node.
func (*RootNode) NewPluginNode ¶
func (n *RootNode) NewPluginNode() *ContainerNode
Returns a new Container Plugin Node.
func (*RootNode) NewServiceNode ¶
func (n *RootNode) NewServiceNode() *ContainerNode
Returns a new Container Service Node.
func (*RootNode) NewShellNode ¶
func (n *RootNode) NewShellNode() *ContainerNode
Returns a new Container Shell Node.
func (*RootNode) NewVolumeNode ¶
func (n *RootNode) NewVolumeNode(name string) *VolumeNode
Returns a new Volume Node.