Documentation ¶
Index ¶
- type STI
- func (builder *STI) Build(config *api.Config) (*api.Result, error)
- func (builder *STI) Execute(command string, user string, config *api.Config) error
- func (builder *STI) Exists(config *api.Config) bool
- func (builder *STI) PostExecute(containerID, destination string) error
- func (builder *STI) Prepare(config *api.Config) error
- func (builder *STI) Save(config *api.Config) (err error)
- func (builder *STI) SetScripts(required, optional []string)
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type STI ¶
type STI struct {
// contains filtered or unexported fields
}
STI strategy executes the S2I build. For more details about S2I, visit https://github.com/openshift/source-to-image
func New ¶
func New(client dockerpkg.Client, config *api.Config, fs fs.FileSystem, overrides build.Overrides) (*STI, error)
New returns the instance of STI builder strategy for the given config. If the layeredBuilder parameter is specified, then the builder provided will be used for the case that the base Docker image does not have 'tar' or 'bash' installed.
func (*STI) Build ¶
Build processes a Request and returns a *api.Result and an error. An error represents a failure performing the build rather than a failure of the build itself. Callers should check the Success field of the result to determine whether a build succeeded or not.
func (*STI) Exists ¶
Exists determines if the current build supports incremental workflow. It checks if the previous image exists in the system and if so, then it verifies that the save-artifacts script is present.
func (*STI) PostExecute ¶
PostExecute allows to execute post-build actions after the Docker container execution finishes.
func (*STI) Prepare ¶
Prepare prepares the source code and tar for build. NOTE: this func serves both the sti and onbuild strategies, as the OnBuild struct Build func leverages the STI struct Prepare func directly below.
func (*STI) Save ¶
Save extracts and restores the build artifacts from the previous build to the current build.
func (*STI) SetScripts ¶
SetScripts allows to override default required and optional scripts