Process container name to ensure validity
authorJohn Salem <josalem@microsoft.com>
Fri, 7 Sep 2018 23:14:26 +0000 (16:14 -0700)
committerJohn Salem <josalem@microsoft.com>
Fri, 7 Sep 2018 23:14:26 +0000 (16:14 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/a3f24d37c96442befc8df679932aae896cc1ca3b

src/libraries/upload-tests.proj

index e5586c8..317ee12 100644 (file)
     <HelixConfigLabel>$(ConfigurationGroup)</HelixConfigLabel>
     <MaxRetryCount>1</MaxRetryCount>
     <TestsBlobPrefix>tests/</TestsBlobPrefix>
-    <!-- Unique container name per build and configuration, e.g., corefx-beta-12345-01-Windows_NT -->
-    <ContainerName Condition="'$(ContainerName)' == ''">corefx-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)-$(OSGroup)-$(ArchGroup)</ContainerName>
+    <!-- Unique container name per build and configuration, e.g., corefx-beta-12345-01-windows -->
+    <!-- Azure Storage containers can only contain [a-z, 0-9, -] in their names and $(OSGroup) is "Windows_NT" on Windows... -->
+    <ProcessedOSGroup>$(OSGroup.ToLower())</ProcessedOSGroup>
+    <ProcessedOSGroup Condition="'$(TargetsWindows)' == 'true'">windows</ProcessedOSGroup>
+    <ProcessedArchGroup>$(ArchGroup.ToLower())</ProcessedArchGroup>
+    <ContainerName Condition="'$(ContainerName)' == ''">corefx-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)-$(ProcessedOSGroup)-$(ProcessedArchGroup)</ContainerName>
   </PropertyGroup>
 
   <Target Name="CoreFXPreCloudBuild" >