sourcegraph/cmd/executor/vm-image/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

48 lines
1.1 KiB
Python

load("//dev:tool_deps.bzl", "SRC_CLI_VERSION")
sh_binary(
name = "ami.build",
srcs = [
"_ami.build.sh",
],
args = [
"$(location //dev/tools:gcloud)",
"$(location //dev/tools:packer)",
"$(location @src-cli-linux-amd64)",
"$(location //cmd/executor)",
"$(location //docker-images/executor-vm:image_tarball)",
],
data = [
# Files to populate the AMI with
"aws_regions.json",
"executor.pkr.hcl",
"install.sh",
# Deps
"//cmd/executor",
"//docker-images/executor-vm:image_tarball",
"@src-cli-linux-amd64",
# Tools
"//dev/tools:gcloud",
"//dev/tools:packer",
],
env = {
"SRC_CLI_VERSION": SRC_CLI_VERSION,
},
deps = ["@bazel_tools//tools/bash/runfiles"],
)
sh_binary(
name = "ami.push",
srcs = [
"_ami.push.sh",
],
args = [
"$(location //dev/tools:gcloud)",
],
data = [
"aws_regions.json",
# aws-cli is baked in the agents, because it's not that easy to get Bazel to install it.
"//dev/tools:gcloud",
],
)