Skip to content

Commit

Permalink
add ova-nfs image
Browse files Browse the repository at this point in the history
Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Feb 10, 2024
1 parent b58609c commit 2a1d321
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions build_tests_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ export REGISTRY_TAG=latest
cp -fr ${SCRIPT_DIR}/stub-images virt-v2v/cold
bazel run --strategy_regexp="RunAndCommitLayer stub-images/virt-v2v-stub/qemu-img-layer.tar"=processwrapper-sandbox --package_path=virt-v2v/cold stub-images:push-forklift-virt-v2v-stub --verbose_failures
bazel run --strategy_regexp="Action stub-images/vddk-test-vmdk/convert_to_vmdk/tmp/cirros.vmdk"=processwrapper-sandbox --package_path=virt-v2v/cold stub-images:push-vddk-test-vmdk --verbose_failures
bazel run --strategy_regexp="RunAndCommitLayer stub-images/ova-nfs/ova-repository-layer.tar"=processwrapper-sandbox --package_path=virt-v2v/cold stub-images:push-forkliftci-ova-nfs --verbose_failures
9 changes: 9 additions & 0 deletions stub-images/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ container_push(
repository = "$${REGISTRY_ORG:-}$${REGISTRY_ORG:+/}vddk-test-vmdk",
tag = "$${REGISTRY_TAG:-devel}",
)

container_push(
name = "push-forkliftci-ova-nfs",
format = "Docker",
image = "//stub-images/ova-nfs:ova-nfs-server",
registry = "$${REGISTRY:-quay.io}",
repository = "$${REGISTRY_ORG:-}$${REGISTRY_ORG:+/}forkliftci-ova-nfs",
tag = "$${REGISTRY_TAG:-devel}",
)
27 changes: 27 additions & 0 deletions stub-images/ova-nfs/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
load(
"@io_bazel_rules_docker//container:container.bzl",
"container_image",
)
load("@io_bazel_rules_docker//docker/util:run.bzl", "container_run_and_commit_layer")

container_run_and_commit_layer(
name = "ova-repository",
commands = [
"dnf -y install nfs-utils wget",
"mkdir -p /home/nfsshare",
"chmod 777 /home/nfsshare",
"echo '/home/nfsshare *(insecure,rw,no_root_squash)' >>/etc/exports",
"cd /home/nfsshare",
"wget https://github.com/kubev2v/forkliftci/releases/download/v9.0/vm.ova",
"systemctl enable nfs-server",
],
image = "@centos-stream-9//image",
)

container_image(
name = "ova-nfs-server",
base = "@centos-stream-9//image",
layers = [":ova-repository"],
user = "1001",
visibility = ["//visibility:public"],
)

0 comments on commit 2a1d321

Please sign in to comment.