1
0
Fork 0

devtools/bazel-cache: build from source, use docker_push

Change-Id: Ie889372b9a7b439e04c1899c90753349440e727a
master
q3k 2019-07-21 23:56:43 +02:00
parent 8fe651b569
commit 356ea8bc3a
4 changed files with 37 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
*swp
bazel-*
/bazel-*
.kubectl

View File

@ -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(

View File

@ -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",
)

View File

@ -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" },
},