mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Docker: use container bundles to upload multiple image tags (#3003)
* use docker tag from environment, if exists * use container bundles to upload multiple image tags
This commit is contained in:
committed by
terence tsao
parent
dfc64121c6
commit
cc696d90e3
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
load("//tools:binary_targets.bzl", "binary_targets")
|
||||
|
||||
go_library(
|
||||
@@ -59,15 +59,13 @@ go_image(
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/beacon-chain",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/beacon-chain:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/beacon-chain:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -41,13 +41,11 @@ go_image(
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/beacon-chain/gateway",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/beacon-chain/gateway:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/beacon-chain/gateway:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -31,44 +29,3 @@ go_binary(
|
||||
embed = [":go_default_library"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
go_image(
|
||||
name = "image",
|
||||
srcs = ["deployContract.go"],
|
||||
importpath = "github.com/prysmaticlabs/prysm/contracts/deposit-contract/deployContract",
|
||||
deps = [
|
||||
"//contracts/deposit-contract:go_default_library",
|
||||
"//shared/params:go_default_library",
|
||||
"//shared/version:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//accounts/abi/bind:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//accounts/keystore:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//common:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//crypto:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//ethclient:go_default_library",
|
||||
"@com_github_ethereum_go_ethereum//rpc:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
"@com_github_urfave_cli//:go_default_library",
|
||||
"@com_github_x_cray_logrus_prefixed_formatter//:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
|
||||
"@io_k8s_client_go//kubernetes:go_default_library",
|
||||
"@io_k8s_client_go//rest:go_default_library",
|
||||
],
|
||||
visibility = ["//visibility:private"],
|
||||
pure = "off", # depends on cgo for go-etheruem crypto
|
||||
static = "on",
|
||||
tags = ["manual"],
|
||||
goarch = "amd64",
|
||||
goos = "linux",
|
||||
race = "off",
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/deploy-deposit-contract",
|
||||
tag = "{DOCKER_TAG}",
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -21,19 +21,17 @@ go_image(
|
||||
goarch = "amd64",
|
||||
goos = "linux",
|
||||
importpath = "github.com/prysmaticlabs/prysm/k8s/geth/prober",
|
||||
static = "on",
|
||||
visibility = ["//visibility:private"],
|
||||
pure = "on",
|
||||
static = "on",
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/geth-prober",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/geth-prober:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/geth-prober:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -48,19 +48,17 @@ go_image(
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/bootnode",
|
||||
tag = "{DOCKER_TAG}",
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "bootnode",
|
||||
embed = [":go_default_library"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/bootnode:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/bootnode:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -44,13 +44,11 @@ go_image(
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/cluster-pk-manager/client",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/cluster-pk-manager/client:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/cluster-pk-manager/client:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -105,13 +105,11 @@ go_image(
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/cluster-pk-manager/server",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/cluster-pk-manager/server:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/cluster-pk-manager/server:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -30,13 +30,11 @@ go_image(
|
||||
deps = ["@org_uber_go_automaxprocs//:go_default_library"],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/contract-addr",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/contract-addr:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/contract-addr:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -39,13 +39,11 @@ go_image(
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/eth1monitor",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/eth1monitor:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/eth1monitor:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
IMPORT_PATH = "github.com/prysmaticlabs/prysm/tools/faucet"
|
||||
|
||||
@@ -53,13 +53,11 @@ go_image(
|
||||
deps = DEPS,
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/faucet",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/faucet:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/faucet:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -40,19 +40,17 @@ go_image(
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/relaynode",
|
||||
tag = "{DOCKER_TAG}",
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "relaynode",
|
||||
embed = [":go_default_library"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/relaynode:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/relaynode:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -38,13 +38,11 @@ go_image(
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/ssz-server",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/ssz-server:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/ssz-server:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle")
|
||||
load("//tools:binary_targets.bzl", "binary_targets")
|
||||
|
||||
go_library(
|
||||
@@ -61,13 +61,12 @@ go_image(
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push_image",
|
||||
format = "Docker",
|
||||
image = ":image",
|
||||
registry = "gcr.io",
|
||||
repository = "prysmaticlabs/prysm/validator",
|
||||
tag = "{DOCKER_TAG}",
|
||||
container_bundle(
|
||||
name = "push_images",
|
||||
images = {
|
||||
"gcr.io/prysmaticlabs/prysm/validator:latest": ":image",
|
||||
"gcr.io/prysmaticlabs/prysm/validator:{DOCKER_TAG}": ":image",
|
||||
},
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user