mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 18:31:54 +00:00
Reverts sourcegraph/sourcegraph#64351 ## Test plan Need to test on main due to main-only CI steps (even with main dry-run)
74 lines
1.7 KiB
Python
74 lines
1.7 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")
|
|
load("//dev:msp_delivery.bzl", "msp_delivery")
|
|
|
|
go_library(
|
|
name = "msp-example_lib",
|
|
srcs = ["main.go"],
|
|
importpath = "github.com/sourcegraph/sourcegraph/cmd/msp-example",
|
|
tags = [TAG_INFRA_CORESERVICES],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
"//cmd/msp-example/service",
|
|
"//lib/managedservicesplatform/runtime",
|
|
],
|
|
)
|
|
|
|
go_binary(
|
|
name = "msp-example",
|
|
embed = [":msp-example_lib"],
|
|
tags = [TAG_INFRA_CORESERVICES],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_tar(
|
|
name = "tar_msp-example",
|
|
srcs = [":msp-example"],
|
|
)
|
|
|
|
oci_image(
|
|
name = "image",
|
|
base = "//wolfi-images/sourcegraph-base:base_image",
|
|
entrypoint = [
|
|
"/sbin/tini",
|
|
"--",
|
|
"/msp-example",
|
|
],
|
|
tars = [":tar_msp-example"],
|
|
user = "sourcegraph",
|
|
)
|
|
|
|
oci_tarball(
|
|
name = "image_tarball",
|
|
image = ":image",
|
|
repo_tags = ["msp-example:candidate"],
|
|
)
|
|
|
|
container_structure_test(
|
|
name = "image_test",
|
|
timeout = "short",
|
|
configs = ["image_test.yaml"],
|
|
driver = "docker",
|
|
image = ":image",
|
|
tags = [
|
|
TAG_INFRA_CORESERVICES,
|
|
"exclusive",
|
|
"requires-network",
|
|
],
|
|
)
|
|
|
|
oci_push(
|
|
name = "candidate_push",
|
|
image = ":image",
|
|
repository = image_repository("msp-example"),
|
|
)
|
|
|
|
msp_delivery(
|
|
name = "msp_deploy",
|
|
gcp_project = "msp-testbed-robert-7be9",
|
|
msp_service_id = "msp-testbed",
|
|
repository = "us.gcr.io/sourcegraph-dev/msp-example",
|
|
)
|