cloudapi: expose upload status

Expose a more detailed job status result - specifically, include upload status
alongside image status. Expand openapi.yml accordingly and add an UploadStatus
field to the OSBuildJobResult struct. At the moment, only represent the
"success" and "failure" states of UploadStatus - to differentiate between
"pending" and "running" would involve significant design decisions and should be
addressed in a separate commit.
This commit is contained in:
Chloe Kaubisch 2021-02-05 12:34:28 +01:00 committed by GitHub
parent 80f833a69b
commit 899d78f7e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 51 additions and 33 deletions

View file

@ -248,10 +248,11 @@ func (server *Server) ComposeStatus(w http.ResponseWriter, r *http.Request, id s
}
response := ComposeStatus{
Status: composeStatusFromJobStatus(status, &result),
ImageStatuses: &[]ImageStatus{
{
Status: composeStatusFromJobStatus(status, &result),
ImageStatus: ImageStatus{
Status: composeStatusFromJobStatus(status, &result),
UploadStatus: &UploadStatus{
Status: result.UploadStatus,
Type: "aws",
},
},
}