Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add status of pushing images to registry #12615

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions pkg/imagebuilder/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ import (
var reportRegex = regexp.MustCompile(`(?s)---IMAGE BUILD REPORT---\n(.*)\n---END OF IMAGE BUILD REPORT---`)

type BuildReport struct {
Status string `json:"status"`
IsSigned bool `json:"signed"`
IsProduction bool `json:"is_production"`
ImageSpec ImageSpec `json:"image_spec"`
// Status is the overall status of the build including signing and pushing
Status string `json:"status"`
// IsPushed indicates whether the image was pushed to a registry
IsPushed bool `json:"pushed"`
// IsSigned indicates whether the image was signed
IsSigned bool `json:"signed"`
// IsProduction indicates whether the image is a production image
IsProduction bool `json:"is_production"`
// ImageSpec contains the image name, tags, and repository path
ImageSpec ImageSpec `json:"image_spec"`
}

type ImageSpec struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/imagebuilder/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/p
---IMAGE BUILD REPORT---
{
"status": "Succeeded",
"pushed": true,
"signed": true,
"is_production": true,
"image_spec": {
Expand All @@ -38,6 +39,7 @@ Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/p
Finishing: prepare_image_build_report`
expectedReport := &BuildReport{
Status: "Succeeded",
IsPushed: true,
IsSigned: true,
IsProduction: true,
ImageSpec: ImageSpec{
Expand Down
Loading