Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Apply suggestions from code review.

Co-authored-by: Sascha Schwarze <[email protected]>
  • Loading branch information
HeavyWombat and SaschaSchwarze0 committed Aug 30, 2021
1 parent e23d471 commit d3b548f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/bundle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func resolveAuthBasedOnTarget(ref name.Reference) (authn.Authenticator, error) {
}

// Look-up the respective registry server inside the credentials
var registryName = ref.Context().RegistryStr()
registryName := ref.Context().RegistryStr()
if registryName == name.DefaultRegistry {
registryName = authn.DefaultAuthKey
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/build/v1alpha1/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Source struct {
// URL describes the URL of the Git repository.
//
// +optional
URL string `json:"url"`
URL string `json:"url,omitempty"`

// BundleContainer
//
Expand Down
1 change: 1 addition & 0 deletions pkg/bundle/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ func Unpack(in io.Reader, targetPath string) error {
}

if _, err := io.Copy(file, tr); err != nil {
file.Close()
return err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/buildrun/resources/sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func AmendTaskSpecWithSources(
case build.Spec.Source.BundleContainer != nil:
sources.AppendBundleStep(cfg, taskSpec, build.Spec.Source, "default")

default:
case build.Spec.Source.URL != "":
sources.AppendGitStep(cfg, taskSpec, build.Spec.Source, "default")
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/buildrun/resources/sources/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func AppendBundleStep(
}

// add the build-specific details
bundleStep.Container.Name = fmt.Sprintf("bundle-%s", name)
bundleStep.Container.Name = fmt.Sprintf("source-%s", name)
bundleStep.Container.Args = []string{
"--image", source.BundleContainer.Image,
"--target", fmt.Sprintf("$(params.%s-%s)", prefixParamsResultsVolumes, paramSourceRoot),
Expand Down

0 comments on commit d3b548f

Please sign in to comment.