diff --git a/components.yaml b/components.yaml index db57760393..08e05a33a6 100644 --- a/components.yaml +++ b/components.yaml @@ -17,12 +17,14 @@ components: branch: main update-policy: latest metadata: v0.50.0-25-g5727cd1 + image: quay.io/kubevirt/kubemacpool kubevirt-ipam-controller: url: https://github.com/kubevirt/ipam-extensions commit: e1c5d84f5604e4bf833d45d8e98b743fe6f31be3 branch: main update-policy: tagged metadata: v0.6.0-rc1 + image: quay.io/kubevirt/ipam-controller linux-bridge: url: https://github.com/containernetworking/plugins commit: c29dc79f96cd50452a247a4591443d2aac033429 diff --git a/tools/bumper/bumper.go b/tools/bumper/bumper.go index 629be7dc09..d106232115 100755 --- a/tools/bumper/bumper.go +++ b/tools/bumper/bumper.go @@ -73,6 +73,11 @@ func main() { exitWithError(errors.Wrapf(err, "Failed to get latest release version tag from %s", componentName)) } + if err := verifyNewReleaseTagImageExist(component.Image, updatedReleaseTag); err != nil { + exitWithError(errors.Wrapf(err, "Failed to verify image exist for component %q image %q updated release tag %q", + componentName, component.Image, updatedReleaseTag)) + } + proposedPrTitle := fmt.Sprintf("bump %s to %s", componentName, updatedReleaseTag) componentBumpNeeded, err := cnaoRepo.isComponentBumpNeeded(currentReleaseTag, updatedReleaseTag, component.Updatepolicy, component.Metadata, proposedPrTitle) diff --git a/tools/bumper/component_commands.go b/tools/bumper/component_commands.go index d9b43912d2..18a5b7aa3d 100644 --- a/tools/bumper/component_commands.go +++ b/tools/bumper/component_commands.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "os" + "os/exec" "sort" "strings" @@ -143,6 +144,15 @@ func newGitRepo(componentName string, componentParams *component) (*gitRepo, err }, nil } +func verifyNewReleaseTagImageExist(componentImage, newReleaseTag string) error { + if componentImage == "" { + return nil + } + logger.Printf("Checking container image tag exist %q %q", componentImage, newReleaseTag) + return exec.Command("skopeo", "inspect", fmt.Sprintf("docker://%s:%s", componentImage, newReleaseTag)).Run() + +} + // getCurrentReleaseTag gets the tag name of currently configured commit sha in this component. // since some tags are represented by the tag sha and not the commit sha, we also need to convert it to commit sha. func (componentOps *gitComponent) getCurrentReleaseTag() (string, error) { diff --git a/tools/bumper/parser.go b/tools/bumper/parser.go index 6fbbcde9d1..806c51533a 100755 --- a/tools/bumper/parser.go +++ b/tools/bumper/parser.go @@ -15,6 +15,7 @@ type component struct { Branch string `yaml:"branch"` Updatepolicy string `yaml:"update-policy"` Metadata string `yaml:"metadata"` + Image string `yaml:"image"` } type componentsConfig struct {