Skip to content

Commit

Permalink
Remove usages of deprecated Bazel features (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlopezgi authored Aug 16, 2018
1 parent c6113a5 commit a25094d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
3 changes: 1 addition & 2 deletions container/flatten.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def _impl(ctx):
container_flatten = rule(
attrs = dict({
"image": attr.label(
allow_files = [".tar"],
single_file = True,
allow_single_file = [".tar"],
mandatory = True,
),
"_flattener": attr.label(
Expand Down
3 changes: 1 addition & 2 deletions container/layer_tools.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ def incremental_load(
tools = {
"incremental_load_template": attr.label(
default = Label("//container:incremental_load_template"),
single_file = True,
allow_files = True,
allow_single_file = True,
),
"join_layers": attr.label(
default = Label("//container:join_layers"),
Expand Down
6 changes: 2 additions & 4 deletions container/push.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ def _impl(ctx):
container_push = rule(
attrs = dict({
"image": attr.label(
allow_files = [".tar"],
single_file = True,
allow_single_file = [".tar"],
mandatory = True,
),
"registry": attr.string(mandatory = True),
Expand All @@ -132,8 +131,7 @@ container_push = rule(
),
"_tag_tpl": attr.label(
default = Label("//container:push-tag.sh.tpl"),
single_file = True,
allow_files = True,
allow_single_file = True,
),
"_pusher": attr.label(
default = Label("@containerregistry//:pusher"),
Expand Down
19 changes: 7 additions & 12 deletions java/image.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ The signature of war_image is compatible with java_library.
load(
"//container:container.bzl",
"container_pull",
_container = "container",
_repositories = "repositories",
)
load(
"//lang:image.bzl",
"dep_layer_impl",
"layer_file_path",
"runfiles_dir",
)

# Load the resolved digests.
load(
Expand Down Expand Up @@ -88,11 +95,6 @@ DEFAULT_JETTY_BASE = select({
"//conditions:default": "@jetty_image_base//image",
})

load(
"//container:container.bzl",
_container = "container",
)

def java_files(f):
files = []
if java_common.provider in f:
Expand All @@ -102,13 +104,6 @@ def java_files(f):
files += list(f.files)
return files

load(
"//lang:image.bzl",
"dep_layer_impl",
"layer_file_path",
"runfiles_dir",
)

def _jar_dep_layer_impl(ctx):
"""Appends a layer for a single dependency's runfiles."""
return dep_layer_impl(ctx, runfiles = java_files)
Expand Down

0 comments on commit a25094d

Please sign in to comment.