Skip to content

Commit

Permalink
Centralize fedora test tool images in one image
Browse files Browse the repository at this point in the history
Merge the sriov image into the fedora test tool image to reduce resource
usage for building and testing.

Signed-off-by: Roman Mohr <rmohr@redhat.com>
  • Loading branch information
rmohr committed Aug 10, 2021
1 parent 397271a commit 3d56cfb
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 37 deletions.
1 change: 0 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ container_bundle(
# Kernel boot container
"$(container_prefix)/$(image_prefix)alpine-ext-kernel-boot-demo:$(container_tag)": "//containerimages:alpine-ext-kernel-boot-demo-container",
# Customized container-disk images
"$(container_prefix)/$(image_prefix)fedora-sriov-lane-container-disk:$(container_tag)": "//containerimages:fedora-sriov-lane-container-disk-image",
"$(container_prefix)/$(image_prefix)fedora-with-test-tooling-container-disk:$(container_tag)": "//containerimages:fedora-with-test-tooling",
# testing images
"$(container_prefix)/$(image_prefix)disks-images-provider:$(container_tag)": "//images/disks-images-provider:disks-images-provider-image",
Expand Down
20 changes: 1 addition & 19 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -334,24 +334,6 @@ container_pull(
tag = "32",
)

# Pull fedora 32 customize container-disk
# WARNING: please update any automated process to push this image to quay.io
# instead of index.docker.io
# TODO build fedora_sriov_lane for multi-arch
container_pull(
name = "fedora_sriov_lane",
digest = "sha256:6f66ee747d62c354c0d36e640f8c97d6be0b6ad88a9e8c0180496ac55cba31bf",
registry = "quay.io",
repository = "kubevirtci/fedora-sriov-testing",
)

container_pull(
name = "fedora_sriov_lane_aarch64",
digest = "sha256:6f66ee747d62c354c0d36e640f8c97d6be0b6ad88a9e8c0180496ac55cba31bf",
registry = "quay.io",
repository = "kubevirtci/fedora-sriov-testing",
)

# Pull go_image_base
container_pull(
name = "go_image_base",
Expand Down Expand Up @@ -390,7 +372,7 @@ container_pull(
# TODO build fedora_with_test_tooling for multi-arch
container_pull(
name = "fedora_with_test_tooling",
digest = "sha256:ce36d2b4f81b038fba0b61b1bb1ac7f671d47687fb1f9d7ddedd22742cc79dd9",
digest = "sha256:14193941e1fe74f2189536263c71479abbd296dc93b75e8a7f97f0b31e78b71e",
registry = "quay.io",
repository = "kubevirtci/fedora-with-test-tooling",
)
Expand Down
14 changes: 0 additions & 14 deletions containerimages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,6 @@ container_image(
visibility = ["//visibility:public"],
)

container_image(
name = "fedora-sriov-lane-container-disk-image",
architecture = select({
"@io_bazel_rules_go//go/platform:linux_arm64": "arm64",
"//conditions:default": "amd64",
}),
base = select({
"@io_bazel_rules_go//go/platform:linux_arm64": "@fedora_sriov_lane_aarch64//image",
"//conditions:default": "@fedora_sriov_lane//image",
}),
mode = "444",
visibility = ["//visibility:public"],
)

container_image(
name = "fedora-with-test-tooling",
architecture = select({
Expand Down
3 changes: 1 addition & 2 deletions tests/containerdisk/containerdisk.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const (
ContainerDiskCirros ContainerDisk = "cirros"
ContainerDiskAlpine ContainerDisk = "alpine"
ContainerDiskFedora ContainerDisk = "fedora-cloud"
ContainerDiskFedoraSRIOVLane ContainerDisk = "fedora-sriov-lane"
ContainerDiskFedoraTestTooling ContainerDisk = "fedora-with-test-tooling"
ContainerDiskMicroLiveCD ContainerDisk = "microlivecd"
ContainerDiskVirtio ContainerDisk = "virtio-container-disk"
Expand All @@ -48,7 +47,7 @@ func ContainerDiskFor(name ContainerDisk) string {
return fmt.Sprintf("%s/%s-container-disk-demo:%s", flags.KubeVirtUtilityRepoPrefix, name, flags.KubeVirtUtilityVersionTag)
case ContainerDiskVirtio:
return fmt.Sprintf("%s/virtio-container-disk:%s", flags.KubeVirtUtilityRepoPrefix, flags.KubeVirtUtilityVersionTag)
case ContainerDiskFedoraSRIOVLane, ContainerDiskFedoraTestTooling:
case ContainerDiskFedoraTestTooling:
return fmt.Sprintf("%s/%s-container-disk:%s", flags.KubeVirtUtilityRepoPrefix, name, flags.KubeVirtUtilityVersionTag)
}
panic(fmt.Sprintf("Unsupported registry disk %s", name))
Expand Down
2 changes: 1 addition & 1 deletion tests/libvmi/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func NewTestToolingFedora(opts ...Option) *kvirtv1.VirtualMachineInstance {
// building its extra properties based on the specified With* options, the
// image used include Guest Agent and some moduled needed by SRIOV.
func NewSriovFedora(opts ...Option) *kvirtv1.VirtualMachineInstance {
return newFedora(cd.ContainerDiskFedoraSRIOVLane, opts...)
return newFedora(cd.ContainerDiskFedoraTestTooling, opts...)
}

// NewFedora instantiates a new Fedora based VMI configuration with specified
Expand Down
1 change: 1 addition & 0 deletions tests/network/vmi_multus.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ var _ = Describe("[Serial]SRIOV", func() {
getSriovVmi := func(networks []string, cloudInitNetworkData string) *v1.VirtualMachineInstance {

withVmiOptions := []libvmi.Option{
libvmi.WithCloudInitNoCloudUserData(tests.GetFedoraToolsGuestAgentUserData(), false),
libvmi.WithCloudInitNoCloudNetworkData(cloudInitNetworkData, false),
libvmi.WithInterface(libvmi.InterfaceDeviceWithMasqueradeBinding()),
libvmi.WithNetwork(v1.DefaultPodNetwork()),
Expand Down

0 comments on commit 3d56cfb

Please sign in to comment.