From 959daa7de3ba717d591959a0d36e0e359aba5c5b Mon Sep 17 00:00:00 2001 From: wtgodbe Date: Tue, 6 Jun 2017 14:12:41 -0700 Subject: [PATCH] Test current packages in CoreCLR official builds --- BuildToolsVersion.txt | 2 +- ...tNet-CoreClr-Trusted-Linux-Crossbuild.json | 2 +- .../DotNet-CoreClr-Trusted-Linux.json | 2 +- buildpipeline/DotNet-CoreClr-Trusted-Mac.json | 2 +- .../DotNet-CoreClr-Trusted-Windows-x86.json | 2 +- .../DotNet-CoreClr-Trusted-Windows.json | 2 +- .../Dotnet-CoreClr-Trusted-BuildTests.json | 58 ++++++++++++++++++- config.json | 18 ++++++ dependencies.props | 12 ++++ dir.props | 12 ++-- src/createVersionFile.proj | 13 +++++ src/syncAzure.proj | 1 + sync.cmd | 2 + tests/build.proj | 2 +- tests/dir.props | 15 ++++- tests/publishdependency.targets | 2 +- tests/runtest.proj | 12 +++- tests/src/dir.props | 1 + 18 files changed, 140 insertions(+), 20 deletions(-) create mode 100644 src/createVersionFile.proj diff --git a/BuildToolsVersion.txt b/BuildToolsVersion.txt index 268988da68d1..a72a2229edb3 100644 --- a/BuildToolsVersion.txt +++ b/BuildToolsVersion.txt @@ -1 +1 @@ -2.0.0-prerelease-01528-03 \ No newline at end of file +2.0.0-prerelease-01702-02 diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json b/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json index 6432a889c7da..312d08c928a7 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Linux-Crossbuild.json @@ -157,7 +157,7 @@ }, "inputs": { "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs) ./build-packages.sh -BuildType=$(PB_BuildType) -BuildArch=$(Architecture)", + "arguments": "run --rm $(DockerCommonRunArgs) ./build-packages.sh -BuildType=$(PB_BuildType) -BuildArch=$(Architecture) -- /p:OfficialBuildId=$(OfficialBuildId)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Linux.json b/buildpipeline/DotNet-CoreClr-Trusted-Linux.json index 82c282d022a6..882c1127ec92 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Linux.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Linux.json @@ -139,7 +139,7 @@ }, "inputs": { "filename": "docker", - "arguments": "run --rm $(DockerCommonRunArgs) ./build-packages.sh -BuildType=$(PB_BuildType) -BuildArch=$(Architecture)", + "arguments": "run --rm $(DockerCommonRunArgs) ./build-packages.sh -BuildType=$(PB_BuildType) -BuildArch=$(Architecture) -- /p:OfficialBuildId=$(OfficialBuildId)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Mac.json b/buildpipeline/DotNet-CoreClr-Trusted-Mac.json index ae289d15f0a3..b96ebb5bbfe2 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Mac.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Mac.json @@ -67,7 +67,7 @@ }, "inputs": { "filename": "$(Agent.BuildDirectory)/s/build-packages.sh", - "arguments": "-BuildType=$(PB_BuildType) -BuildArch=$(Architecture)", + "arguments": "-BuildType=$(PB_BuildType) -BuildArch=$(Architecture) -- /p:OfficialBuildId=$(OfficialBuildId)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json b/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json index f6a852f7cdb5..8ec9054c631e 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json @@ -131,7 +131,7 @@ }, "inputs": { "filename": "build-packages.cmd", - "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType)", + "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) -- /p:OfficialBuildId=$(OfficialBuildId)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Windows.json b/buildpipeline/DotNet-CoreClr-Trusted-Windows.json index cb2e57080ec0..6cf49de9a69c 100644 --- a/buildpipeline/DotNet-CoreClr-Trusted-Windows.json +++ b/buildpipeline/DotNet-CoreClr-Trusted-Windows.json @@ -131,7 +131,7 @@ }, "inputs": { "filename": "build-packages.cmd", - "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType)", + "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) -- /p:OfficialBuildId=$(OfficialBuildId)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/buildpipeline/Dotnet-CoreClr-Trusted-BuildTests.json b/buildpipeline/Dotnet-CoreClr-Trusted-BuildTests.json index 5c96c1d5fbbe..f7b795c7f172 100644 --- a/buildpipeline/Dotnet-CoreClr-Trusted-BuildTests.json +++ b/buildpipeline/Dotnet-CoreClr-Trusted-BuildTests.json @@ -41,7 +41,7 @@ "enabled": true, "continueOnError": true, "alwaysRun": false, - "displayName": "Run sync.cmd", + "displayName": "Sync test native binaries", "timeoutInMinutes": 0, "task": { "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", @@ -55,6 +55,60 @@ "failOnStandardError": "false" } }, + { + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Sync packages", + "timeoutInMinutes": 0, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "versionSpec": "1.*", + "definitionType": "task" + }, + "inputs": { + "filename": "sync.cmd", + "arguments": "-ab -AzureAccount=$(CloudDropAccountName) -AzureToken=$(CloudDropAccessToken) -Container=$(Label) -BlobNamePrefix=$(PB_BuildType)/pkg/Microsoft", + "workingFolder": "", + "failOnStandardError": "false" + } + }, + { + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Sync runtime packages", + "timeoutInMinutes": 0, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "versionSpec": "1.*", + "definitionType": "task" + }, + "inputs": { + "filename": "sync.cmd", + "arguments": "-ab -AzureAccount=$(CloudDropAccountName) -AzureToken=$(CloudDropAccessToken) -Container=$(Label) -BlobNamePrefix=$(PB_BuildType)/pkg/runtime", + "workingFolder": "", + "failOnStandardError": "false" + } + }, + { + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Generate version props file", + "timeoutInMinutes": 0, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "versionSpec": "1.*", + "definitionType": "task" + }, + "inputs": { + "filename": "msbuild", + "arguments": "createVersionFile.proj /p:OfficialBuildId=$(OfficialBuildId)", + "workingFolder": "src", + "failOnStandardError": "false" + } + }, { "enabled": true, "continueOnError": false, @@ -68,7 +122,7 @@ }, "inputs": { "filename": "build-test.cmd", - "arguments": "$(PB_BuildType) $(Architecture) buildagainstpackages runtimeid $(Rid) $(TargetsNonWindowsArg)$(CrossgenArg)-OfficialBuildId=$(OfficialBuildId) -Priority=$(Priority)", + "arguments": "$(PB_BuildType) $(Architecture) buildagainstpackages runtimeid $(Rid) $(TargetsNonWindowsArg)$(CrossgenArg)-OfficialBuildId=$(OfficialBuildId) -OverwriteCoreClrPackageVersion -Priority=$(Priority)", "workingFolder": "", "failOnStandardError": "false" } diff --git a/config.json b/config.json index 5f75afbdacc0..5011de3e7ff7 100644 --- a/config.json +++ b/config.json @@ -30,6 +30,12 @@ "values": [], "defaultValue": "" }, + "__BlobNamePrefix": { + "description": "Blob Prefix for Azure download.", + "valueType": "property", + "values": [], + "defaultValue": "" + }, "MsBuildFileLogging": { "description": "MsBuild logging options.", "valueType": "passThrough", @@ -174,6 +180,12 @@ "values": [], "defaultValue": "" }, + "OverwriteCoreClrPackageVersion": { + "description": "Sets the property specifying to overwrite CoreClr Package version using OfficialBuildId", + "valueType": "property", + "values": [ true, false ], + "defaultValue": true + }, "OfficialBuildId": { "description": "Official Build Id.", "valueType": "property", @@ -531,6 +543,12 @@ "__Container": "default" } }, + "blobNamePrefix": { + "description": "Blob Prefix to download from in Azure container.", + "settings": { + "__BlobNamePrefix": "default" + } + }, "runtimeId": { "description": "Runtime ID of the binaries in the specified container.", "settings": { diff --git a/dependencies.props b/dependencies.props index 528b6cc72e2e..75f2e76c6a59 100644 --- a/dependencies.props +++ b/dependencies.props @@ -1,4 +1,16 @@ + + + + 2.0.0 + + + false + $(PackageVersion) + + preview2 + + d4040dc6f74933eec9827d44e288c9cd15996a15 diff --git a/dir.props b/dir.props index 4f62d0e907ac..966876850779 100644 --- a/dir.props +++ b/dir.props @@ -120,7 +120,6 @@ https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT - preview2 $(SourceDir).nuget/descriptions.json $(ProjectDir)LICENSE.TXT $(ProjectDir)THIRD-PARTY-NOTICES.TXT @@ -134,13 +133,6 @@ https://go.microsoft.com/fwlink/?LinkID=799421 https://dot.net - - - 2.0.0 - - - false - $(PackageVersion) diff --git a/src/createVersionFile.proj b/src/createVersionFile.proj new file mode 100644 index 000000000000..4edddc71189e --- /dev/null +++ b/src/createVersionFile.proj @@ -0,0 +1,13 @@ + + + + + + + false + + + + + \ No newline at end of file diff --git a/src/syncAzure.proj b/src/syncAzure.proj index a5bb4958a926..aeea48de9a27 100644 --- a/src/syncAzure.proj +++ b/src/syncAzure.proj @@ -7,6 +7,7 @@ $(ContainerNamePrefix)-$(BuildNumberMajor)-$(BuildNumberMinor) $(__Container) $(ContainerName.Replace(".","-")) + $(__BlobNamePrefix) $(PackagesDir)AzureTransfer $(PackagesDir)TestNativeBins\$(RuntimeId) diff --git a/sync.cmd b/sync.cmd index f63315559d9b..218fb9de8e1f 100644 --- a/sync.cmd +++ b/sync.cmd @@ -26,6 +26,8 @@ echo -BuildMajor echo -BuildMinor echo To download from a specific container, specify: echo -Container="container name" +echo To download blobs starting with a specific prefix, specify: +echo -BlobNamePrefix="Blob name prefix" echo -n - Downloads test native binaries from the specified container echo The following properties are required: echo -AzureAccount="Account name" diff --git a/tests/build.proj b/tests/build.proj index 066f2a237044..ff2d96badae7 100644 --- a/tests/build.proj +++ b/tests/build.proj @@ -50,7 +50,7 @@ - diff --git a/tests/dir.props b/tests/dir.props index e98b3036ebe7..96c3b2a6d9a9 100644 --- a/tests/dir.props +++ b/tests/dir.props @@ -1,5 +1,4 @@ - @@ -67,6 +66,7 @@ + @@ -77,6 +77,19 @@ false + + $(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props + + + + + + + $(StableVersion) + $(PackageVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor) + /p:CoreClrPackageVersion=$(VersionToRestore) + + + + + + $(StableVersion) + $(PackageVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor) + $(VersionToRestore) + @@ -326,6 +335,7 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). $(RuntimeId) $(TestNugetRuntimeId) + $(CoreClrPackageVersion) diff --git a/tests/src/dir.props b/tests/src/dir.props index abad765fe49a..245e9f798237 100644 --- a/tests/src/dir.props +++ b/tests/src/dir.props @@ -94,4 +94,5 @@ netcoreapp2.0 true +