-
Notifications
You must be signed in to change notification settings - Fork 0
/
repositories.bzl
136 lines (119 loc) · 6.03 KB
/
repositories.bzl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
CONTAINERREGISTRY_RELEASE = "v0.0.36"
RULES_DOCKER_GO_BINARY_RELEASE = "66e5e1a894eda961a35c024db6ce91d31008c1e9"
def repositories():
"""Download dependencies of container rules."""
excludes = native.existing_rules().keys()
if "io_bazel_rules_docker" not in excludes:
http_archive(
name = "io_bazel_rules_docker",
sha256 = "dc97fccceacd4c6be14e800b2a00693d5e8d07f69ee187babfd04a80a9f8e250",
strip_prefix = "rules_docker-0.14.1",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.14.1/rules_docker-v0.14.1.tar.gz"],
)
# Go binaries.
if "go_puller_linux" not in excludes:
http_file(
name = "go_puller_linux",
executable = True,
sha256 = "1af92327e21eff7630bc38e33bf82ec01c5db9a64b61ad8ebe0f90c774076d74",
urls = [("https://storage.googleapis.com/rules_docker/" + RULES_DOCKER_GO_BINARY_RELEASE + "/puller-linux-amd64")],
)
if "go_puller_darwin" not in excludes:
http_file(
name = "go_puller_darwin",
executable = True,
sha256 = "34aa3e299c806ce59a012bd1b3a245e25807988e5475189d2edc075163b47dad",
urls = [("https://storage.googleapis.com/rules_docker/" + RULES_DOCKER_GO_BINARY_RELEASE + "/puller-darwin-amd64")],
)
if "loader_linux" not in excludes:
http_file(
name = "loader_linux",
executable = True,
sha256 = "8566ab69573d4196f57e2d7303e341e813920d966b445ac6c86f091a2c91c368",
urls = [("https://storage.googleapis.com/rules_docker/" + RULES_DOCKER_GO_BINARY_RELEASE + "/loader-linux-amd64")],
)
if "loader_darwin" not in excludes:
http_file(
name = "loader_darwin",
executable = True,
sha256 = "bc27e7b202fb2e1b8cb960f4752713a53f239069320c77b1f428bb7a658c6a7b",
urls = [("https://storage.googleapis.com/rules_docker/" + RULES_DOCKER_GO_BINARY_RELEASE + "/loader-darwin-amd64")],
)
if "containerregistry" not in excludes:
http_archive(
name = "containerregistry",
sha256 = "a8cdf2452323e0fefa4edb01c08b2ec438c9fa3192bc9f408b89287598c12abc",
strip_prefix = "containerregistry-" + CONTAINERREGISTRY_RELEASE[1:],
urls = [("https://github.com/google/containerregistry/archive/" +
CONTAINERREGISTRY_RELEASE + ".tar.gz")],
)
# TODO(mattmoor): Remove all of this (copied from google/containerregistry)
# once transitive workspace instantiation lands.
if "io_bazel_rules_go" not in excludes:
http_archive(
name = "io_bazel_rules_go",
sha256 = "b27e55d2dcc9e6020e17614ae6e0374818a3e3ce6f2024036e688ada24110444",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.21.0/rules_go-v0.21.0.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.21.0/rules_go-v0.21.0.tar.gz",
],
)
if "rules_python" not in excludes:
http_archive(
name = "rules_python",
sha256 = "c911dc70f62f507f3a361cbc21d6e0d502b91254382255309bc60b7a0f48de28",
strip_prefix = "rules_python-38f86fb55b698c51e8510c807489c9f4e047480e",
urls = ["https://github.com/bazelbuild/rules_python/archive/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz"],
)
# For packaging python tools.
if "subpar" not in excludes:
http_archive(
name = "subpar",
sha256 = "481233d60c547e0902d381cd4fb85b63168130379600f330821475ad234d9336",
# Commit from 2019-03-07.
strip_prefix = "subpar-9fae6b63cfeace2e0fb93c9c1ebdc28d3991b16f",
urls = ["https://github.com/google/subpar/archive/9fae6b63cfeace2e0fb93c9c1ebdc28d3991b16f.tar.gz"],
)
if "structure_test_linux" not in excludes:
http_file(
name = "structure_test_linux",
executable = True,
sha256 = "cfdfedd77c04becff0ea16a4b8ebc3b57bf404c56e5408b30d4fbb35853db67c",
urls = ["https://storage.googleapis.com/container-structure-test/v1.8.0/container-structure-test-linux-amd64"],
)
if "structure_test_darwin" not in excludes:
http_file(
name = "structure_test_darwin",
executable = True,
sha256 = "14e94f75112a8e1b08a2d10f2467d27db0b94232a276ddd1e1512593a7b7cf5a",
urls = ["https://storage.googleapis.com/container-structure-test/v1.8.0/container-structure-test-darwin-amd64"],
)
if "container_diff" not in excludes:
http_file(
name = "container_diff",
executable = True,
sha256 = "65b10a92ca1eb575037c012c6ab24ae6fe4a913ed86b38048781b17d7cf8021b",
urls = ["https://storage.googleapis.com/container-diff/v0.15.0/container-diff-linux-amd64"],
)
# For bzl_library.
if "bazel_skylib" not in excludes:
http_archive(
name = "bazel_skylib",
sha256 = "e5d90f0ec952883d56747b7604e2a15ee36e288bb556c3d0ed33e818a4d971f2",
strip_prefix = "bazel-skylib-1.0.2",
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/1.0.2.tar.gz"],
)
if "bazel_gazelle" not in excludes:
http_archive(
name = "bazel_gazelle",
sha256 = "86c6d481b3f7aedc1d60c1c211c6f76da282ae197c3b3160f54bd3a8f847896f",
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.1/bazel-gazelle-v0.19.1.tar.gz"],
)
native.register_toolchains(
# Register the default docker toolchain that expects the 'docker'
# executable to be in the PATH
"@io_bazel_rules_docker//toolchains/docker:default_linux_toolchain",
"@io_bazel_rules_docker//toolchains/docker:default_windows_toolchain",
"@io_bazel_rules_docker//toolchains/docker:default_osx_toolchain",
)