Documentation ¶
Index ¶
- Constants
- func CheckError(err error)
- func NewAssembleError(name, output string, err error) error
- func NewBuildError(name string, err error) error
- func NewCommitError(name string, err error) error
- func NewContainerError(name string, code int, output string) error
- func NewDownloadError(url string, code int) error
- func NewEmptyGitRepositoryError(source string) error
- func NewInspectImageError(name string, err error) error
- func NewInstallError(script string) error
- func NewInstallRequiredError(scripts []string, label string) error
- func NewPullImageError(name string, err error) error
- func NewSaveArtifactsError(name, output string, err error) error
- func NewScriptsInsideImageError(url string) error
- func NewSourcePathError(path string) error
- func NewTarTimeoutError() error
- func NewURLHandlerError(url string) error
- func NewUserNotAllowedError(image string, onbuild bool) error
- func NewWorkDirError(dir string, err error) error
- func UsageError(msg string) error
- type ContainerError
- type Error
Constants ¶
const ( InspectImageError int = 1 + iota PullImageError SaveArtifactsError AssembleError WorkdirError BuildError TarTimeoutError DownloadError ScriptsInsideImageError InstallError InstallErrorRequired URLHandlerError STIContainerError SourcePathError UserNotAllowedError EmptyGitRepositoryError )
Common S2I errors
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶ added in v1.1.4
func CheckError(err error)
CheckError checks input error. 1. if the input error is nil, the function does nothing but return. 2. if the input error is a kind of Error which is thrown during S2I execution, the function handle it with Suggestion and Details. 3. if the input error is a kind of system Error which is unknown, the function exit with 1.
func NewAssembleError ¶
NewAssembleError returns a new error which indicates there was a problem running assemble script
func NewBuildError ¶
NewBuildError returns a new error which indicates there was a problem building the image
func NewCommitError ¶ added in v1.0.8
NewCommitError returns a new error which indicates there was a problem committing the image
func NewContainerError ¶
NewContainerError return a new error which indicates there was a problem invoking command inside container
func NewDownloadError ¶
NewDownloadError returns a new error which indicates there was a problem when downloading a file
func NewEmptyGitRepositoryError ¶ added in v1.1.2
NewEmptyGitRepositoryError returns a new error which indicates that a found .git directory has no tracking information, e.g. if the user simply used `git init` and forgot about the repository
func NewInspectImageError ¶
NewInspectImageError returns a new error which indicates there was a problem inspecting the image
func NewInstallError ¶
NewInstallError returns a new error which indicates there was a problem when downloading a script
func NewInstallRequiredError ¶
NewInstallRequiredError returns a new error which indicates there was a problem when downloading a required script
func NewPullImageError ¶
NewPullImageError returns a new error which indicates there was a problem pulling the image
func NewSaveArtifactsError ¶
NewSaveArtifactsError returns a new error which indicates there was a problem calling save-artifacts script
func NewScriptsInsideImageError ¶
NewScriptsInsideImageError returns a new error which informs of scripts being placed inside the image
func NewSourcePathError ¶ added in v1.0.1
NewSourcePathError returns a new error which indicates there was a problem when accessing the source code from the local filesystem
func NewTarTimeoutError ¶
func NewTarTimeoutError() error
NewTarTimeoutError returns a new error which indicates there was a problem when sending or receiving tar stream
func NewURLHandlerError ¶
NewURLHandlerError returns a new error which indicates there was a problem when trying to read scripts URL
func NewUserNotAllowedError ¶ added in v1.1.0
NewUserNotAllowedError returns a new error that indicates that the build could not run because the image uses a user outside of the range of allowed users
func NewWorkDirError ¶
NewWorkDirError returns a new error which indicates there was a problem when creating working directory
func UsageError ¶ added in v1.1.4
UsageError checks command usage error.
Types ¶
type ContainerError ¶
type ContainerError struct { Message string Output string ErrorCode int Suggestion string ExitCode int }
ContainerError is an error returned when a container exits with a non-zero code. ExitCode contains the exit code from the container
func (ContainerError) Error ¶
func (s ContainerError) Error() string
Error returns a string for the given error