sourcegraph/cmd/executor-kubernetes/BUILD.bazel
Noah S-C b9c4e2aae9
Revert "Revert "refactor: upgrade to rules_oci 2.0 (2nd attempt)"" (#64354)
Reverts sourcegraph/sourcegraph#64351

## Test plan

Need to test on main due to main-only CI steps (even with main dry-run)
2024-08-08 09:00:08 +00:00

57 lines
1.2 KiB
Python

load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
load("//dev:oci_defs.bzl", "pkg_tar")
load("@container_structure_test//:defs.bzl", "container_structure_test")
load("//cmd/server:macro.bzl", "container_dependencies", "dependencies_tars")
load("//wolfi-images:defs.bzl", "wolfi_base")
DEPS = [
"//cmd/executor",
]
container_dependencies(DEPS)
pkg_tar(
name = "tar_src-cli",
srcs = ["@src-cli-linux-amd64//:src-cli-linux-amd64"],
package_dir = "/usr/local/bin",
)
oci_image(
name = "image",
base = ":base_image",
entrypoint = [
"/sbin/tini",
"--",
"/usr/local/bin/executor",
],
tars = dependencies_tars(DEPS) + [":tar_src-cli"],
user = "sourcegraph",
)
oci_tarball(
name = "image_tarball",
image = ":image",
repo_tags = ["executor-kubernetes:candidate"],
)
container_structure_test(
name = "image_test",
timeout = "short",
configs = ["image_test.yaml"],
driver = "docker",
image = ":image",
tags = [
TAG_SEARCHSUITE,
"exclusive",
"requires-network",
],
)
oci_push(
name = "candidate_push",
image = ":image",
repository = image_repository("executor-kubernetes"),
)
wolfi_base()