Skip to content

Commit

Permalink
fix: debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
exu committed Feb 4, 2022
1 parent 7999a30 commit a390421
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions cmd/kubectl-testkube/commands/scripts/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ func newContentFromFlags(cmd *cobra.Command) (content *testkube.ScriptContent, e
scriptContentType = string(testkube.ScriptContentTypeString)
}

fmt.Printf("git uri %+v\n", gitUri)
fmt.Printf("git branch %+v\n", gitBranch)
fmt.Printf("uri %+v\n", uri)

var repository *testkube.Repository
if gitUri != "" && gitBranch != "" {
if scriptContentType == "" {
Expand Down
6 changes: 4 additions & 2 deletions pkg/storage/minio/minio.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (c *Client) SaveFile(bucket, filePath string) error {
defer object.Close()
objectStat, err := object.Stat()
if err != nil {
return fmt.Errorf("minio SaveFile.object.Stat error: %w", err)
return fmt.Errorf("minio object stat (file:%s) error: %w", filePath, err)
}

var fileName string
Expand All @@ -119,9 +119,11 @@ func (c *Client) SaveFile(bucket, filePath string) error {
fileName = objectStat.Name()
}

fmt.Printf("SAVING: %+v\n", filePath)

_, err = c.minioclient.PutObject(context.Background(), bucket, fileName, object, objectStat.Size(), minio.PutObjectOptions{ContentType: "application/octet-stream"})
if err != nil {
return fmt.Errorf("minio saving file putting object error: %w", err)
return fmt.Errorf("minio saving file (%s) put object error: %w", fileName, err)
}

return nil
Expand Down

0 comments on commit a390421

Please sign in to comment.