Skip to content
Draft
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
2 changes: 2 additions & 0 deletions components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions tools/bumper/bumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions tools/bumper/component_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"os/exec"
"sort"
"strings"

Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions tools/bumper/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading