Merge pull request #2863 from grubernaut/issue_1059
Print slug size before upload in packer's atlas post-processor
This commit is contained in:
commit
8d19ac2dd3
|
@ -204,7 +204,8 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|||
opts.FileSize = r.Size
|
||||
}
|
||||
|
||||
ui.Message("Uploading artifact version...")
|
||||
fileSizeMB := float64(opts.FileSize / 1000000)
|
||||
ui.Message(fmt.Sprintf("Uploading artifact (Size: %.2fMB)", fileSizeMB))
|
||||
var av *atlas.ArtifactVersion
|
||||
doneCh := make(chan struct{})
|
||||
errCh := make(chan error, 1)
|
||||
|
@ -220,7 +221,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|||
|
||||
select {
|
||||
case err := <-errCh:
|
||||
return nil, false, fmt.Errorf("Error uploading: %s", err)
|
||||
return nil, false, fmt.Errorf("Error uploading (Size: %.2fMB): %s", fileSizeMB, err)
|
||||
case <-doneCh:
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue