From 274dd9d5d835f1c744296fc51d9676dc92a0ac0e Mon Sep 17 00:00:00 2001 From: Malte Poll Date: Mon, 11 Sep 2023 15:46:43 +0200 Subject: [PATCH] upgrade-agent: package as tar --- upgrade-agent/cmd/BUILD.bazel | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/upgrade-agent/cmd/BUILD.bazel b/upgrade-agent/cmd/BUILD.bazel index a441325c9..8f1694cfe 100644 --- a/upgrade-agent/cmd/BUILD.bazel +++ b/upgrade-agent/cmd/BUILD.bazel @@ -1,4 +1,5 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") +load("@rules_pkg//:pkg.bzl", "pkg_tar") load("//bazel/go:platform.bzl", "platform_binary") go_library( @@ -30,3 +31,13 @@ platform_binary( target_file = ":cmd", visibility = ["//visibility:public"], ) + +pkg_tar( + name = "upgrade-agent-package", + srcs = [ + ":upgrade_agent_linux_amd64", + ], + mode = "0755", + remap_paths = {"/platform:linux_amd64_gnu.2.23": "/usr/bin/upgrade-agent"}, + visibility = ["//visibility:public"], +)