Make the repository compatible with the future versions of Bazel
Change-Id: Ia9b3f6e8d75a4898fbc71690cd518e8ca003850e
diff --git a/WORKSPACE b/WORKSPACE
index c30fe7c..886cc78 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -16,7 +16,7 @@
git_repository(
name = "io_bazel_rules_docker",
remote = "https://github.com/bazelbuild/rules_docker.git",
- commit = "e770f81cef4165828df955f37b827874a884a1de",
+ commit = "db1b348dfdf161a784bc1efc5a1020395572b996",
)
load(
@@ -128,9 +128,9 @@
# - Repository overrely on bind() and does not respect naming conventions
http_archive(
name = "io_bazel_rules_groovy",
- url = "https://github.com/bazelbuild/rules_groovy/archive/1256063915da0e46c229ce93489175f0d084f0cb.zip",
- sha256 = "0e7a425e3ebcc649c4fac9876ebbfdb3948bf97c47954ffda3e15b32a5bf4b6e",
- strip_prefix = "rules_groovy-1256063915da0e46c229ce93489175f0d084f0cb",
+ url = "https://github.com/bazelbuild/rules_groovy/archive/6b8e32ce0f7e33ae1b859706c2dc0c169b966e7e.zip",
+ sha256 = "9dac7ddcf9e0004b1eeaf53dd9324350601eaee8c252f77423330af3effe2f5c",
+ strip_prefix = "rules_groovy-6b8e32ce0f7e33ae1b859706c2dc0c169b966e7e",
)
load("@io_bazel_rules_groovy//groovy:groovy.bzl", "groovy_repositories")
groovy_repositories()
diff --git a/gcr/docker_push.bzl b/gcr/docker_push.bzl
index b0d5c07..6bacfee 100644
--- a/gcr/docker_push.bzl
+++ b/gcr/docker_push.bzl
@@ -29,9 +29,12 @@
def _generate_load_statement(ctx, tag, file):
return ("echo 'Image %s'\n" % tag) + "\n".join([
- "incr_load '%s' '%s'" % (_get_runfile_path(ctx, l["id"]),
- _get_runfile_path(ctx, l["layer"]))
- for l in _reverse(file.docker_layers)
+ "incr_load '%s' '%s'" % (_get_runfile_path(ctx, id),
+ _get_runfile_path(ctx, layer))
+ for id, layer in _reverse(zip(
+ file.docker_parts["diff_id"],
+ file.docker_parts["unzipped_layer"]
+ ))
]) + ("\ntag_last_load '%s'" % tag)
# TODO(dmarting): replace with proper docker_push using the docker library.
@@ -55,9 +58,10 @@
)
runfiles = []
for s in ctx.attr.images:
- for l in s.docker_layers:
- runfiles.append(l["layer"])
- runfiles.append(l["id"])
+ for l in s.docker_parts["unzipped_layer"]:
+ runfiles.append(l)
+ for id in s.docker_parts["diff_id"]:
+ runfiles.append(id)
return struct(runfiles = ctx.runfiles(files = runfiles))
@@ -70,7 +74,7 @@
single_file=True,
allow_files=True),
"image_tags": attr.string_list(),
- "images": attr.label_list(providers=["docker_layers"]),
+ "images": attr.label_list(providers=["docker_parts"]),
},
executable = True,
)
diff --git a/jenkins/build_defs/jenkins_job.bzl b/jenkins/build_defs/jenkins_job.bzl
index 5735b27..78c1b1a 100644
--- a/jenkins/build_defs/jenkins_job.bzl
+++ b/jenkins/build_defs/jenkins_job.bzl
@@ -49,7 +49,7 @@
git_url = github_url
if not project_url:
project_url = git_url
- deps += [deps_aliases[k] for k in deps_aliases]
+ deps = deps + [deps_aliases[k] for k in deps_aliases]
substitutions = substitutions + {
"GITHUB_URL": github_url,
"GIT_URL": git_url,