Skip to content

Commit

Permalink
Merge pull request #9524 from riyad/apiv3-print-tags-when-building
Browse files Browse the repository at this point in the history
[Compat API] Also print successfully tagging images in /build endpoint
  • Loading branch information
openshift-merge-robot authored Mar 11, 2021
2 parents e2d35e5 + ba319e3 commit 8d33bfa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions pkg/api/handlers/compat/images_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,13 @@ loop:
logrus.Warnf("Failed to json encode error %v", err)
}
flush()
for _, tag := range query.Tag {
m.Stream = fmt.Sprintf("Successfully tagged %s\n", tag)
if err := enc.Encode(m); err != nil {
logrus.Warnf("Failed to json encode error %v", err)
}
flush()
}
}
}
break loop
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/server/register_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// example: |
// (build details...)
// Successfully built 8ba084515c724cbf90d447a63600c0a6
// Successfully tagged your_image:latest
// 400:
// $ref: "#/responses/BadParamError"
// 500:
Expand Down Expand Up @@ -1485,7 +1486,6 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: output from build process
// example: |
// (build details...)
// Successfully built 8ba084515c724cbf90d447a63600c0a6
// 400:
// $ref: "#/responses/BadParamError"
// 500:
Expand Down

0 comments on commit 8d33bfa

Please sign in to comment.