forked from hswaw/hscloud
devtools/bazel-cache: build from source, use docker_push
Change-Id: Ie889372b9a7b439e04c1899c90753349440e727amaster
parent
8fe651b569
commit
356ea8bc3a
|
@ -1,3 +1,3 @@
|
|||
*swp
|
||||
bazel-*
|
||||
/bazel-*
|
||||
.kubectl
|
||||
|
|
25
WORKSPACE
25
WORKSPACE
|
@ -21,6 +21,14 @@ http_archive(
|
|||
urls = ["https://github.com/bazelbuild/rules_docker/archive/v0.8.1.tar.gz"],
|
||||
)
|
||||
|
||||
load("@io_bazel_rules_docker//toolchains/docker:toolchain.bzl", docker_toolchain_configure = "toolchain_configure")
|
||||
|
||||
# This forces the use of Docker $HOME/.docker configuration.
|
||||
docker_toolchain_configure(
|
||||
name = "docker_config",
|
||||
client_config = "",
|
||||
)
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_docker//repositories:repositories.bzl",
|
||||
container_repositories = "repositories",
|
||||
|
@ -173,6 +181,23 @@ maven_jar(
|
|||
sha1 = "4216af16d38465bbab0f3dff8efa14204f7a399a",
|
||||
)
|
||||
|
||||
# For devtools/bazel-cache
|
||||
|
||||
git_repository(
|
||||
name = "com_github_buchgr_bazel_remote",
|
||||
remote = "https://github.com/buchgr/bazel-remote.git",
|
||||
commit = "a9374e638411da72a2ef2a83f490e61e2d74a976",
|
||||
)
|
||||
|
||||
# Go image repos for Docker
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_docker//go:image.bzl",
|
||||
go_image_repositories = "repositories",
|
||||
)
|
||||
|
||||
go_image_repositories()
|
||||
|
||||
# Go repositories
|
||||
|
||||
go_repository(
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
|
||||
container_push(
|
||||
name = "push",
|
||||
image = "@com_github_buchgr_bazel_remote//:bazel-remote-image",
|
||||
format = "Docker",
|
||||
registry = "registry.k0.hswaw.net",
|
||||
repository = "devtools/bazel-cache",
|
||||
tag = "latest",
|
||||
)
|
|
@ -49,7 +49,7 @@ local kube = import "../../kube/kube.libsonnet";
|
|||
},
|
||||
containers_: {
|
||||
auth: kube.Container("bazel-remote") {
|
||||
image: "buchgr/bazel-remote-cache",
|
||||
image: "registry.k0.hswaw.net/devtools/bazel-cache:latest",
|
||||
volumeMounts_: {
|
||||
data: { mountPath: "/data" },
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue