Skip to content

Commit

Permalink
Tweak the manner in which we alias things to.
Browse files Browse the repository at this point in the history
This simplifies the import into the mono-repo.
mattmoor committed Sep 27, 2017
1 parent 839a297 commit 77ecfad
Showing 2 changed files with 7 additions and 49 deletions.
27 changes: 4 additions & 23 deletions docker/docker.bzl
Original file line number Diff line number Diff line change
@@ -14,39 +14,20 @@
"""Rules for manipulation Docker images."""

load(
"//container:image.bzl",
"//container:container.bzl",
"container_push",
docker_build = "container_image",
docker_image = "container_image",
)
load(
"//container:bundle.bzl",
docker_bundle = "container_bundle",
)
load(
"//container:flatten.bzl",
docker_flatten = "container_flatten",
)
load(
"//container:import.bzl",
docker_image = "container_image",
docker_import = "container_import",
)
load(
"//container:pull.bzl",
docker_pull = "container_pull",
docker_repositories = "repositories",
)

# Expose the docker_push rule.
load("//container:push.bzl", "container_push")

def docker_push(*args, **kwargs):
if "format" in kwargs:
fail("Cannot override 'format' attribute on docker_push",
attr="format")
kwargs["format"] = "Docker"
container_push(*args, **kwargs)

# Backwards-compatibility alias.
load(
"//container:container.bzl",
docker_repositories = "repositories",
)
29 changes: 3 additions & 26 deletions oci/oci.bzl
Original file line number Diff line number Diff line change
@@ -13,39 +13,16 @@
# limitations under the License.
"""Rules for manipulation OCI images."""

# Expose the oci_image rule.
load(
"//container:image.bzl",
oci_image = "container_image",
)

# Expose the oci_bundle rule.
load(
"//container:bundle.bzl",
"//container:container.bzl",
"container_push",
oci_bundle = "container_bundle",
)

# Expose the oci_flatten rule.
load(
"//container:flatten.bzl",
oci_flatten = "container_flatten",
)

# Expose the oci_import rule.
load(
"//container:import.bzl",
oci_image = "container_image",
oci_import = "container_import",
)

# Expose the oci_pull repository rule.
load(
"//container:pull.bzl",
oci_pull = "container_pull",
)

# Expose the oci_push rule.
load("//container:push.bzl", "container_push")

def oci_push(*args, **kwargs):
if "format" in kwargs:
fail("Cannot override 'format' attribute on oci_push",

0 comments on commit 77ecfad

Please sign in to comment.