diff --git a/docs/cli.md b/docs/cli.md index 3aae59eee..7f7e2ca3a 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -24,7 +24,7 @@ at common flags that can be used with all of the subcommands. #### Log levels -There are four log levels: +There are six log levels: * Level `0` - produces output from containers running `assemble` script and all encountered errors * Level `1` - produces basic information about the executed process * Level `2` - produces very detailed information about the executed process diff --git a/docs/debugging-s2i.md b/docs/debugging-s2i.md index 1a98a612a..db2bf5410 100644 --- a/docs/debugging-s2i.md +++ b/docs/debugging-s2i.md @@ -86,7 +86,7 @@ Properly reference the script location with the methods described in the above l At various points when executing ONBUILD instructions (these are defined in the Dockerfile of the builder image you are using with s2i), if those instructions result in the need for root user access, but your builder image is not configured to run as root, then attempts to reference that image in another Dockerfile will result in permission errors. -If you consider the following Dockerfile psuedo-example: +If you consider the following Dockerfile pseudo-example: ``` FROM foo diff --git a/pkg/api/doc.go b/pkg/api/doc.go index 482630f67..efa1609a4 100644 --- a/pkg/api/doc.go +++ b/pkg/api/doc.go @@ -1,2 +1,2 @@ -// Provides types used for processing sti builds. +// Provides types used for processing s2i builds. package api diff --git a/pkg/build/strategies/onbuild/onbuild.go b/pkg/build/strategies/onbuild/onbuild.go index d236228aa..29c5227a3 100644 --- a/pkg/build/strategies/onbuild/onbuild.go +++ b/pkg/build/strategies/onbuild/onbuild.go @@ -161,7 +161,7 @@ func (builder *OnBuild) CreateDockerfile(config *api.Config) error { // If there is an assemble script present, run it as part of the build process // as the last thing. if builder.hasAssembleScript(config) { - buffer.WriteString(fmt.Sprintf("RUN sh assemble\n")) + buffer.WriteString("RUN sh assemble\n") } // FIXME: This assumes that the WORKDIR is set to the application source root // directory. @@ -184,7 +184,7 @@ func (builder *OnBuild) copySTIScripts(config *api.Config) { // hasAssembleScript checks if the the assemble script is available func (builder *OnBuild) hasAssembleScript(config *api.Config) bool { - assemblePath := filepath.Join(config.WorkingDir, "upload", "src", "assemble") + assemblePath := filepath.Join(config.WorkingDir, "upload", "src", api.Assemble) _, err := builder.fs.Stat(assemblePath) return err == nil } diff --git a/pkg/build/strategies/sti/sti.go b/pkg/build/strategies/sti/sti.go index 4d11404cc..960f3693d 100644 --- a/pkg/build/strategies/sti/sti.go +++ b/pkg/build/strategies/sti/sti.go @@ -35,8 +35,8 @@ var ( } ) -// STI strategy executes the STI build. -// For more details about STI, visit https://github.com/openshift/source-to-image +// STI strategy executes the S2I build. +// For more details about S2I, visit https://github.com/openshift/source-to-image type STI struct { config *api.Config result *api.Result diff --git a/pkg/config/config.go b/pkg/config/config.go index 2c086e322..673e75601 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -14,7 +14,7 @@ import ( // DefaultConfigPath specifies the default location of the S2I config file const DefaultConfigPath = ".s2ifile" -// Config represents a basic serialization for the STI build options +// Config represents a basic serialization for the S2I build options. type Config struct { Source string `json:"source" yaml:"source"` BuilderImage string `json:"builderImage" yaml:"builderImage"` @@ -22,7 +22,7 @@ type Config struct { Flags map[string]string `json:"flags,omitempty" yaml:"flags,omitempty"` } -// Save persists the STI command line arguments into disk +// Save persists the S2I command line arguments into disk. func Save(config *api.Config, cmd *cobra.Command) { c := Config{ BuilderImage: config.BuilderImage, diff --git a/pkg/docker/docker.go b/pkg/docker/docker.go index 16c8c1732..6c9003c17 100644 --- a/pkg/docker/docker.go +++ b/pkg/docker/docker.go @@ -72,7 +72,7 @@ type Docker interface { BuildImage(opts BuildImageOptions) error GetImageUser(name string) (string, error) GetLabels(name string) (map[string]string, error) - UploadToContainer(srcPath, destPath, name string) error + UploadToContainer(srcPath, destPath, container string) error Ping() error } @@ -260,7 +260,7 @@ func (d *stiDocker) GetImageWorkdir(name string) (string, error) { // out the WORKDIR of the image that the container was created from and use that // as a destination. If the WORKDIR is not set, then we copy files into "/" // folder (docker upload default). -func (d *stiDocker) UploadToContainer(src, dest, name string) error { +func (d *stiDocker) UploadToContainer(src, dest, container string) error { path := filepath.Dir(dest) f, err := os.Open(src) if err != nil { @@ -288,7 +288,7 @@ func (d *stiDocker) UploadToContainer(src, dest, name string) error { } glog.V(3).Infof("Uploading %q to %q ...", src, path) opts := docker.UploadToContainerOptions{Path: path, InputStream: r} - return d.client.UploadToContainer(name, opts) + return d.client.UploadToContainer(container, opts) } // IsImageInLocalRegistry determines whether the supplied image is in the local registry. diff --git a/pkg/docker/fake_docker.go b/pkg/docker/fake_docker.go index bc77c923b..dd7200964 100644 --- a/pkg/docker/fake_docker.go +++ b/pkg/docker/fake_docker.go @@ -98,7 +98,7 @@ func (f *FakeDocker) RunContainer(opts RunContainerOptions) error { return f.RunContainerError } -func (f *FakeDocker) UploadToContainer(srcPath, destPath, name string) error { +func (f *FakeDocker) UploadToContainer(srcPath, destPath, container string) error { return nil } diff --git a/pkg/run/run.go b/pkg/run/run.go index 196791f91..a5a5f1bc9 100644 --- a/pkg/run/run.go +++ b/pkg/run/run.go @@ -17,7 +17,7 @@ type DockerRunner struct { ContainerClient docker.Docker } -// New creates a DockerRunner for executing the methods assoicated with running +// New creates a DockerRunner for executing the methods associated with running // the produced image in a docker container for verification purposes. func New(config *api.Config) (*DockerRunner, error) { client, err := docker.New(config.DockerConfig, config.PullAuthentication) diff --git a/pkg/scm/git/git.go b/pkg/scm/git/git.go index 91ae998d8..234371309 100644 --- a/pkg/scm/git/git.go +++ b/pkg/scm/git/git.go @@ -189,7 +189,7 @@ func ParseURL(source string) (*url.URL, error) { return nil, fmt.Errorf("unsupported protocol specfied: %s", uri.Scheme) } - // have a valid protocol, return sucess + // have a valid protocol, return success return uri, nil } @@ -392,7 +392,7 @@ func (h *stiGit) Clone(source, target string, c api.CloneConfig) error { // git, sending of stdout/stderr to the Pipes created here, and the glog routines sent to pipeToLog // // It was agreed that we wanted to keep --quiet and no stdout output ....leaving stderr only since - // --quiet does not surpress that anyway reduced the frequency of the hang, but it still occurred. + // --quiet does not suppress that anyway reduced the frequency of the hang, but it still occurred. // the pipeToLog method has been left for now for historical purposes, but if this implemenetation // of git clone holds, we'll want to delete that at some point. diff --git a/pkg/util/timeout.go b/pkg/util/timeout.go index 519d2e367..ef22eeb55 100644 --- a/pkg/util/timeout.go +++ b/pkg/util/timeout.go @@ -5,7 +5,7 @@ import ( "time" ) -// TimeoutError is error returned after timeout occured. +// TimeoutError is error returned after timeout occurred. type TimeoutError struct { after time.Duration message string diff --git a/pkg/version/doc.go b/pkg/version/doc.go index ffa2b09ee..0f1a5c938 100644 --- a/pkg/version/doc.go +++ b/pkg/version/doc.go @@ -1,2 +1,2 @@ -// Package version supplies version information for STI collected at build time. +// Package version supplies version information for S2I collected at build time. package version