(ctx context.Context, uploadURL string, archiveReader io.Reader, archiveSize int64)
| 105 | } |
| 106 | |
| 107 | func uploadArchive(ctx context.Context, uploadURL string, archiveReader io.Reader, archiveSize int64) (*http.Response, error) { |
| 108 | scalingoio.Status("Uploading archive…") |
| 109 | req, err := http.NewRequestWithContext(ctx, "PUT", uploadURL, archiveReader) |
| 110 | if err != nil { |
| 111 | return nil, errors.Wrapf(ctx, err, "fail to create the PUT request to upload the WAR archive") |
| 112 | } |
| 113 | |
| 114 | req.Header.Set("Content-Type", "application/x-gzip") |
| 115 | req.ContentLength = archiveSize |
| 116 | |
| 117 | debug.Println("Uploading archive to ", uploadURL, "with headers", req.Header) |
| 118 | |
| 119 | return http.DefaultClient.Do(req) |
| 120 | } |
| 121 | |
| 122 | func showQueuedWarnings(ctx context.Context, client *scalingo.Client, appID, deploymentID string) { |
| 123 | for { |
no outgoing calls
no test coverage detected