Fix installation of Bazel on Windows [MSVC variant]

- -msvc label appears twice in the name of the binary not once.
  The naming scheme is probably not what we want but until the
  naming scheme is fully fixed, fix the reimaging script.
- Use releases.bazel.build instead of github (faster and more reliable).
- Remove pre-0.5.0 codepath

Change-Id: Ic3765f68b40ed2a08f0128acb781c8a6cd656798
diff --git a/gce/jenkins-slave-windows.ps1 b/gce/jenkins-slave-windows.ps1
index 1538033..cf4f846 100644
--- a/gce/jenkins-slave-windows.ps1
+++ b/gce/jenkins-slave-windows.ps1
@@ -94,30 +94,19 @@
 # This will be replaced in vm.sh with $MSVC_LABEL='-msvc' for Windows MSVC nodes 
 $MSVC_LABEL=''
 $folder="c:\bazel_ci\installs\${BAZEL_VERSION}"
-$url="https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel${MSVC_LABEL}-${BAZEL_VERSION}-windows-x86_64.exe"
+$url="https://releases.bazel.build/${BAZEL_VERSION}/release/bazel${MSVC_LABEL}-${BAZEL_VERSION}-windows${MSVC_LABEL}-x86_64.exe"
 New-Item $folder -type directory -force
 
 # Continue if MSVC Bazel download fails due to not releasing yet
-# TODO(pcloudy): Remove this after MSVC Bazel is released
-if ($MSVC_LABEL -eq '-msvc') { $ErrorActionPreference = 'Continue' }
 (New-Object Net.WebClient).DownloadFile("${url}", "${folder}\bazel.exe")
-if ($MSVC_LABEL -eq '-msvc') { $ErrorActionPreference = 'Stop' }
 
 # Create a junction to the latest release
 # The CI machines have Powershell 4 installed, so we cannot use New-Item to
 # create a junction, so shell out to mklink.
 cmd.exe /C mklink /j C:\bazel_ci\installs\latest $folder
 
-# On MSVC nodes, we still need to download a Bazel for bootstrap.
-# TODO(pcloudy): Refactor this after MSVC Bazel is released.
-if ($MSVC_LABEL -eq '-msvc') {
-  $folder="c:\bazel_ci\installs\bootstrap"
-  $url="https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-windows-x86_64.exe"
-  New-Item $folder -type directory -force
-  (New-Object Net.WebClient).DownloadFile("${url}", "${folder}\bazel.exe")
-} else {
-  cmd.exe /C mklink /j C:\bazel_ci\installs\bootstrap $folder
-}
+# Also use the latest release for bootstrapping
+cmd.exe /C mklink /j C:\bazel_ci\installs\bootstrap $folder
 
 
 # Replace the host name in the JNLP file, because Jenkins, in its infinite
diff --git a/jenkins/jobs/Bazel-Install.bat.tpl b/jenkins/jobs/Bazel-Install.bat.tpl
index 3105f65..e50eddb 100644
--- a/jenkins/jobs/Bazel-Install.bat.tpl
+++ b/jenkins/jobs/Bazel-Install.bat.tpl
@@ -31,10 +31,10 @@
 
 if "%PLATFORM_NAME:~0,12%" == "windows-msvc" (
 :: Download MSVC version Bazel, this will fail before MSVC Bazel is released
-  set url='https://github.com/bazelbuild/bazel/releases/download/%BAZEL_VERSION%/bazel-msvc-%BAZEL_VERSION%-windows-x86_64.exe'
+  set url='https://releases.bazel.build/%BAZEL_VERSION%/release/bazel-msvc-%BAZEL_VERSION%-windows-msvc-x86_64.exe'
 ) else (
 :: Download MSYS version Bazel
-  set url='https://github.com/bazelbuild/bazel/releases/download/%BAZEL_VERSION%/bazel-%BAZEL_VERSION%-windows-x86_64.exe'
+  set url='https://releases.bazel.build/releases/%BAZEL_VERSION%/release/bazel-%BAZEL_VERSION%-windows-x86_64.exe'
 )
 
 if not exist %folder%\bazel.exe (