Add latest alias for platform and configs. (#219)

* Add latest alias for platform and configs.

These should only be used internally and in Buildkite CI. Other users
should not depend on these.

https://github.com/bazelbuild/continuous-integration/issues/319

diff --git a/configs/debian8_clang/BUILD b/configs/debian8_clang/BUILD
index 0b53f6f..4f23c95 100644
--- a/configs/debian8_clang/BUILD
+++ b/configs/debian8_clang/BUILD
@@ -25,6 +25,41 @@
     "debian8_clang_default_repos",
 )
 
+PACKAGE = "//configs/debian8_clang/"
+
+# Update the following (if needed) in new config releases.
+LATEST_CONFIG_VERSION = "0.4.0"
+
+LATEST_BAZEL_VERSION = "0.18.0"
+
+CONFIG_TYPES = [
+    "default",
+    "msan",
+]
+
+# DO NOT depend on the following latest alias in your production jobs.
+# These are for internal and our CI use only. We DO NOT guarantee that they
+# will always work.
+[alias(
+    name = "latest_crosstool_top_" + config_type,
+    actual = PACKAGE + LATEST_CONFIG_VERSION + "/bazel_" + LATEST_BAZEL_VERSION + "/" + config_type + ":toolchain",
+) for config_type in CONFIG_TYPES]
+
+[alias(
+    name = "latest_toolchain_" + config_type,
+    actual = PACKAGE + LATEST_CONFIG_VERSION + "/bazel_" + LATEST_BAZEL_VERSION + "/cpp:cc-toolchain-clang-x86_64-" + config_type,
+) for config_type in CONFIG_TYPES]
+
+alias(
+    name = "latest_platform",
+    actual = PACKAGE + LATEST_CONFIG_VERSION + ":rbe_debian8_jdk8",
+)
+
+alias(
+    name = "latest_javabase",
+    actual = PACKAGE + LATEST_CONFIG_VERSION + ":jdk8",
+)
+
 # Created on 2017.10.18
 docker_toolchain_autoconfig(
     name = "debian8-clang-0.2.0-bazel_0.7.0-autoconfig",
diff --git a/configs/ubuntu16_04_clang/BUILD b/configs/ubuntu16_04_clang/BUILD
index dae7c50..7899698 100644
--- a/configs/ubuntu16_04_clang/BUILD
+++ b/configs/ubuntu16_04_clang/BUILD
@@ -25,6 +25,41 @@
     "ubuntu16_04_clang_default_repos",
 )
 
+PACKAGE = "//configs/ubuntu16_04_clang/"
+
+# Update the following (if needed) in new config releases.
+LATEST_CONFIG_VERSION = "1.1"
+
+LATEST_BAZEL_VERSION = "0.18.0"
+
+CONFIG_TYPES = [
+    "default",
+    "msan",
+]
+
+# DO NOT depend on the following latest alias in your production jobs.
+# These are for internal and our CI use only. We DO NOT guarantee that they
+# will always work.
+[alias(
+    name = "latest_crosstool_top_" + config_type,
+    actual = PACKAGE + LATEST_CONFIG_VERSION + "/bazel_" + LATEST_BAZEL_VERSION + "/" + config_type + ":toolchain",
+) for config_type in CONFIG_TYPES]
+
+[alias(
+    name = "latest_toolchain_" + config_type,
+    actual = PACKAGE + LATEST_CONFIG_VERSION + "/bazel_" + LATEST_BAZEL_VERSION + "/cpp:cc-toolchain-clang-x86_64-" + config_type,
+) for config_type in CONFIG_TYPES]
+
+alias(
+    name = "latest_platform",
+    actual = PACKAGE + LATEST_CONFIG_VERSION + ":rbe_ubuntu1604_jdk8",
+)
+
+alias(
+    name = "latest_javabase",
+    actual = PACKAGE + LATEST_CONFIG_VERSION + ":jdk8",
+)
+
 # Created on 2018.05.09
 # Container: gcr.io/cloud-marketplace/google/clang-ubuntu@sha256:d553634f23f7c437ca35bbc4b6f1f38bb81be32b9ef2df4329dcd36762277bf7
 # Clang revision: r328903