Set helix source correctly for prodcon build (#16412) (#16837)
authorMatt Mitchell <mmitche@microsoft.com>
Thu, 8 Mar 2018 18:17:20 +0000 (10:17 -0800)
committerGitHub <noreply@github.com>
Thu, 8 Mar 2018 18:17:20 +0000 (10:17 -0800)
* Set helix source correctly for prodcon build

tests/helixpublish.proj

index c2ea60d..5d1b7d1 100644 (file)
@@ -32,6 +32,8 @@
 
     <HelixJobType Condition="'$(HelixJobType)'==''">test/functional/cli/</HelixJobType>
 
+    <!-- Detect whether we are on a product construction build via ProductBuildId. If so, set source appropriately -->
+    <HelixSource Condition="'$(HelixSource)'=='' And '$(IsOfficial)'!='' And '$(TestProduct)'!='' And '$(Branch)'!='' And '$(ProductBuildId)'!=''">prodcon/$(TestProduct)/$(Branch)/</HelixSource>
     <HelixSource Condition="'$(HelixSource)'=='' And '$(IsOfficial)'!='' And '$(TestProduct)'!='' And '$(Branch)'!=''">official/$(TestProduct)/$(Branch)/</HelixSource>
     <HelixSource Condition="'$(HelixSource)'=='' And '$(IsOfficial)'=='' And '$(TestProduct)'!='' And '$(Branch)'!=''">pr/$(TestProduct)/$(Branch)/</HelixSource>
     <HelixSource Condition="'$(HelixSource)'==''">pr/unknown/</HelixSource>
@@ -41,7 +43,8 @@
 
     <!-- Properties used for submission by CloudTest.Helix.Targets-->
     <BuildMoniker>$(CurrentDate)</BuildMoniker>
-    <BuildMoniker Condition="'$(IsOfficial)'=='true'">$(OfficialBuildId)</BuildMoniker>
+    <BuildMoniker Condition="'$(IsOfficial)'=='true' And '$(ProductBuildId)'==''">$(OfficialBuildId)</BuildMoniker>
+    <BuildMoniker Condition="'$(IsOfficial)'=='true' And '$(ProductBuildId)'!=''">$(ProductBuildId)</BuildMoniker>
     <HelixArchLabel>$(Platform)</HelixArchLabel>
     <HelixConfigLabel>$(BuildType)</HelixConfigLabel>
   </PropertyGroup>