Skip to content

Commit 3e09d09

Browse files
committed
Migrate the layers.bzl utilities to container/
1 parent 9997f27 commit 3e09d09

File tree

12 files changed

+33
-75
lines changed

12 files changed

+33
-75
lines changed

container/BUILD

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,28 @@ package(default_visibility = ["//visibility:public"])
1616
licenses(["notice"]) # Apache 2.0
1717

1818
exports_files(["push-tag.sh.tpl"])
19+
20+
filegroup(
21+
name = "incremental_load_template",
22+
srcs = ["incremental_load.sh.tpl"],
23+
visibility = ["//visibility:public"],
24+
)
25+
26+
py_binary(
27+
name = "extract_config",
28+
srcs = ["extract_config.py"],
29+
visibility = ["//visibility:public"],
30+
deps = [
31+
"@containerregistry//:containerregistry",
32+
],
33+
)
34+
35+
py_binary(
36+
name = "join_layers",
37+
srcs = ["join_layers.py"],
38+
visibility = ["//visibility:public"],
39+
deps = [
40+
"//docker:utils",
41+
"@containerregistry//:containerregistry",
42+
],
43+
)

container/bundle.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ load(
1818
_string_to_label = "string_to_label",
1919
)
2020
load(
21-
"//docker:layers.bzl",
21+
"//container:layers.bzl",
2222
_assemble_image = "assemble",
2323
_get_layers = "get_from_target",
2424
_incr_load = "incremental_load",

container/flatten.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ load(
1818
_get_runfile_path = "runfile",
1919
)
2020
load(
21-
"//docker:layers.bzl",
21+
"//container:layers.bzl",
2222
_get_layers = "get_from_target",
2323
_layer_tools = "tools",
2424
)

container/import.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ load(
2727
_gunzip = "gunzip",
2828
)
2929
load(
30-
"//docker:layers.bzl",
30+
"//container:layers.bzl",
3131
_assemble_image = "assemble",
3232
_incr_load = "incremental_load",
3333
_layer_tools = "tools",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,18 @@ def incremental_load(ctx, images, output,
163163

164164
tools = {
165165
"incremental_load_template": attr.label(
166-
default = Label("//docker:incremental_load_template"),
166+
default = Label("//container:incremental_load_template"),
167167
single_file = True,
168168
allow_files = True,
169169
),
170170
"join_layers": attr.label(
171-
default = Label("//docker:join_layers"),
171+
default = Label("//container:join_layers"),
172172
cfg = "host",
173173
executable = True,
174174
allow_files = True,
175175
),
176176
"extract_config": attr.label(
177-
default = Label("//docker:extract_config"),
177+
default = Label("//container:extract_config"),
178178
cfg = "host",
179179
executable = True,
180180
allow_files = True,

container/push.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ load(
2222
"runfile",
2323
)
2424
load(
25-
"//docker:layers.bzl",
25+
"//container:layers.bzl",
2626
_get_layers = "get_from_target",
2727
_layer_tools = "tools",
2828
)

docker/BUILD

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ sh_test(
8787
data = TEST_DATA + ["testenv.sh"],
8888
)
8989

90-
# Used by docker_build and friends
91-
9290
py_binary(
9391
name = "create_image_config",
9492
srcs = ["create_image_config.py"],
@@ -99,25 +97,6 @@ py_binary(
9997
],
10098
)
10199

102-
py_binary(
103-
name = "extract_config",
104-
srcs = ["extract_config.py"],
105-
visibility = ["//visibility:public"],
106-
deps = [
107-
"@containerregistry//:containerregistry",
108-
],
109-
)
110-
111-
py_binary(
112-
name = "join_layers",
113-
srcs = ["join_layers.py"],
114-
visibility = ["//visibility:public"],
115-
deps = [
116-
":utils",
117-
"@containerregistry//:containerregistry",
118-
],
119-
)
120-
121100
py_library(
122101
name = "utils",
123102
srcs = [
@@ -126,12 +105,6 @@ py_library(
126105
],
127106
)
128107

129-
filegroup(
130-
name = "incremental_load_template",
131-
srcs = ["incremental_load.sh.tpl"],
132-
visibility = ["//visibility:public"],
133-
)
134-
135108
py_binary(
136109
name = "build_tar",
137110
srcs = ["build_tar.py"],

0 commit comments

Comments
 (0)