Skip to content

Commit

Permalink
Bazelify ova-provider
Browse files Browse the repository at this point in the history
Build the ova provider server image using bazel.

Signed-off-by: Liran Rotenberg <[email protected]>
  • Loading branch information
liranr23 committed Oct 10, 2023
1 parent d12046a commit fb4faa7
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 36 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,13 @@ push-openstack-populator-image: build-openstack-populator-image
$(CONTAINER_CMD) push $(OPENSTACK_POPULATOR_IMAGE)

build-ova-provider-server-image: check_container_runtime
$(CONTAINER_CMD) build -f hack/ova-provider-server/Containerfile -t $(OVA_PROVIDER_SERVER_IMAGE) .
export CONTAINER_CMD=$(CONTAINER_CMD); \
bazel run cmd/ova-provider-server:ova-provider-server-image \
$(BAZEL_OPTS) \
--action_env CONTAINER_CMD=$(CONTAINER_CMD)

push-ova-provider-server-image: build-ova-provider-server-image
$(CONTAINER_CMD) tag bazel/cmd/ova-provider-server:ova-provider-server-image $(OVA_PROVIDER_SERVER_IMAGE)
$(CONTAINER_CMD) push $(OVA_PROVIDER_SERVER_IMAGE)

build-all-images: build-api-image \
Expand Down
15 changes: 9 additions & 6 deletions cmd/ova-provider-server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ load(
"container_image",
)

container_image(
name = "ova-provider-server-image",
base = "@ova-provider-server-image-dockerfile//image:dockerfile_image.tar",
visibility = ["//visibility:public"],
)

go_test(
name = "ova-provider-server_test",
srcs = ["nfs_test.go"],
embed = [":ova-provider-server_lib"],
deps = ["//vendor/github.com/onsi/gomega"],
)

container_image(
name = "ova-provider-server-image",
base = "@ubi9-minimal//image",
directory = "/usr/local/bin/",
entrypoint = ["/usr/local/bin/ova-provider-server"],
files = [":ova-provider-server"],
visibility = ["//visibility:public"],
)
Empty file.
8 changes: 0 additions & 8 deletions hack/ova-provider-server/Containerfile

This file was deleted.

18 changes: 0 additions & 18 deletions hack/ovirt-populator/Containerfile

This file was deleted.

1 change: 0 additions & 1 deletion openstack_populator_containerfile

This file was deleted.

1 change: 0 additions & 1 deletion ova_provider_server_containerfile

This file was deleted.

1 change: 0 additions & 1 deletion ovirt_populator_containerfile

This file was deleted.

0 comments on commit fb4faa7

Please sign in to comment.