Revert "Make the repository compatible with the future versions of Bazel"

This reverts commit 82df6bcd3897eaa149ac264f03439c76fba5794f.

Break bazel run //gcr:deploy

Change-Id: I1b67615b0fb183d1b985effaabca5adaa9ca4720
diff --git a/WORKSPACE b/WORKSPACE
index 886cc78..c30fe7c 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 = "db1b348dfdf161a784bc1efc5a1020395572b996",
+    commit = "e770f81cef4165828df955f37b827874a884a1de",
 )
 
 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/6b8e32ce0f7e33ae1b859706c2dc0c169b966e7e.zip",
-    sha256 = "9dac7ddcf9e0004b1eeaf53dd9324350601eaee8c252f77423330af3effe2f5c",
-    strip_prefix = "rules_groovy-6b8e32ce0f7e33ae1b859706c2dc0c169b966e7e",
+    url = "https://github.com/bazelbuild/rules_groovy/archive/1256063915da0e46c229ce93489175f0d084f0cb.zip",
+    sha256 = "0e7a425e3ebcc649c4fac9876ebbfdb3948bf97c47954ffda3e15b32a5bf4b6e",
+    strip_prefix = "rules_groovy-1256063915da0e46c229ce93489175f0d084f0cb",
 )
 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 6bacfee..b0d5c07 100644
--- a/gcr/docker_push.bzl
+++ b/gcr/docker_push.bzl
@@ -29,12 +29,9 @@
 
 def _generate_load_statement(ctx, tag, file):
   return ("echo 'Image %s'\n" % tag) + "\n".join([
-      "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"]
-      ))
+      "incr_load '%s' '%s'" %  (_get_runfile_path(ctx, l["id"]),
+                                _get_runfile_path(ctx, l["layer"]))
+      for l in _reverse(file.docker_layers)
   ]) + ("\ntag_last_load '%s'" % tag)
 
 # TODO(dmarting): replace with proper docker_push using the docker library.
@@ -58,10 +55,9 @@
   )
   runfiles = []
   for s in ctx.attr.images:
-    for l in s.docker_parts["unzipped_layer"]:
-      runfiles.append(l)
-    for id in s.docker_parts["diff_id"]:
-      runfiles.append(id)
+    for l in s.docker_layers:
+      runfiles.append(l["layer"])
+      runfiles.append(l["id"])
 
   return struct(runfiles = ctx.runfiles(files = runfiles))
 
@@ -74,7 +70,7 @@
             single_file=True,
             allow_files=True),
         "image_tags": attr.string_list(),
-        "images": attr.label_list(providers=["docker_parts"]),
+        "images": attr.label_list(providers=["docker_layers"]),
     },
     executable = True,
 )
diff --git a/jenkins/build_defs/jenkins_job.bzl b/jenkins/build_defs/jenkins_job.bzl
index 78c1b1a..5735b27 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 + [deps_aliases[k] for k in deps_aliases]
+  deps += [deps_aliases[k] for k in deps_aliases]
   substitutions = substitutions + {
       "GITHUB_URL": github_url,
       "GIT_URL": git_url,