mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:31:48 +00:00
Reverts sourcegraph/sourcegraph#64351 ## Test plan Need to test on main due to main-only CI steps (even with main dry-run)
67 lines
1.5 KiB
Python
67 lines
1.5 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
|
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")
|
|
|
|
go_library(
|
|
name = "loadtest_lib",
|
|
srcs = ["main.go"],
|
|
importpath = "github.com/sourcegraph/sourcegraph/cmd/loadtest",
|
|
tags = [TAG_PLATFORM_SEARCH],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
"//internal/env",
|
|
"//internal/sanitycheck",
|
|
"//lib/errors",
|
|
"@com_github_sourcegraph_log//:log",
|
|
],
|
|
)
|
|
|
|
go_binary(
|
|
name = "loadtest",
|
|
embed = [":loadtest_lib"],
|
|
tags = [TAG_PLATFORM_SEARCH],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_tar(
|
|
name = "tar_loadtest",
|
|
srcs = [":loadtest"],
|
|
)
|
|
|
|
oci_image(
|
|
name = "image",
|
|
base = "//wolfi-images/sourcegraph-base:base_image",
|
|
entrypoint = [
|
|
"/sbin/tini",
|
|
"--",
|
|
"/loadtest",
|
|
],
|
|
tars = [":tar_loadtest"],
|
|
)
|
|
|
|
oci_tarball(
|
|
name = "image_tarball",
|
|
image = ":image",
|
|
repo_tags = ["loadtest:candidate"],
|
|
)
|
|
|
|
container_structure_test(
|
|
name = "image_test",
|
|
timeout = "short",
|
|
configs = ["image_test.yaml"],
|
|
driver = "docker",
|
|
image = ":image",
|
|
tags = [
|
|
"exclusive",
|
|
"requires-network",
|
|
TAG_PLATFORM_SEARCH,
|
|
],
|
|
)
|
|
|
|
oci_push(
|
|
name = "candidate_push",
|
|
image = ":image",
|
|
repository = image_repository("loadtest"),
|
|
)
|