summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json14
-rw-r--r--buildpipeline/DotNet-CoreClr-Trusted-Windows.json11
-rw-r--r--buildpipeline/DotNet-Trusted-Publish.json55
-rw-r--r--src/sign.builds2
4 files changed, 23 insertions, 59 deletions
diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json b/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json
index a4d6566a98..46d0918e8e 100644
--- a/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json
+++ b/buildpipeline/DotNet-CoreClr-Trusted-Windows-x86.json
@@ -6,13 +6,14 @@
"alwaysRun": false,
"displayName": "Install Signing Plugin",
"timeoutInMinutes": 0,
+ "condition": "ne(variables['PB_SignType'], 'oss')",
"task": {
"id": "30666190-6959-11e5-9f96-f56098202fef",
"versionSpec": "1.*",
"definitionType": "task"
},
"inputs": {
- "signType": "$(SignType)",
+ "signType": "$(PB_SignType)",
"zipSources": "false",
"version": "",
"feedSource": "https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json"
@@ -86,7 +87,7 @@
},
"inputs": {
"filename": "build.cmd",
- "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages $(PB_EnforcePGO) -OfficialBuildId=$(OfficialBuildId) -skiprestore -Priority=$(Priority)",
+ "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages $(PB_EnforcePGO) -OfficialBuildId=$(OfficialBuildId) -skiprestore -Priority=$(Priority) -- /p:SignType=$(PB_SignType)",
"workingFolder": "",
"failOnStandardError": "false"
}
@@ -106,7 +107,7 @@
"solution": "src\\sign.builds",
"platform": "",
"configuration": "",
- "msbuildArguments": "/p:SignType=$(SignType) /p:BuildType=$(PB_BuildType) /p:BuildArch=$(Architecture)",
+ "msbuildArguments": "/p:SignType=$(PB_SignType) /p:BuildType=$(PB_BuildType) /p:BuildArch=$(Architecture)",
"clean": "false",
"maximumCpuCount": "false",
"restoreNugetPackages": "false",
@@ -131,7 +132,7 @@
},
"inputs": {
"filename": "build-packages.cmd",
- "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) -- /p:OfficialBuildId=$(OfficialBuildId)",
+ "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) -- /p:SignType=$(PB_SignType) /p:OfficialBuildId=$(OfficialBuildId)",
"workingFolder": "",
"failOnStandardError": "false"
}
@@ -276,8 +277,9 @@
"Label": {
"value": "$(Build.BuildNumber)"
},
- "SignType": {
- "value": "test"
+ "PB_SignType": {
+ "value": "test",
+ "allowOverride": true
},
"TeamName": {
"value": "DotNetCore"
diff --git a/buildpipeline/DotNet-CoreClr-Trusted-Windows.json b/buildpipeline/DotNet-CoreClr-Trusted-Windows.json
index a97132b25e..4bfa771cba 100644
--- a/buildpipeline/DotNet-CoreClr-Trusted-Windows.json
+++ b/buildpipeline/DotNet-CoreClr-Trusted-Windows.json
@@ -6,13 +6,14 @@
"alwaysRun": false,
"displayName": "Install Signing Plugin",
"timeoutInMinutes": 0,
+ "condition": "ne(variables['PB_SignType'], 'oss')",
"task": {
"id": "30666190-6959-11e5-9f96-f56098202fef",
"versionSpec": "1.*",
"definitionType": "task"
},
"inputs": {
- "signType": "$(SignType)",
+ "signType": "$(PB_SignType)",
"zipSources": "false",
"version": "",
"feedSource": "https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json"
@@ -86,7 +87,7 @@
},
"inputs": {
"filename": "build.cmd",
- "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages $(PB_EnforcePGO) toolset_dir C:\\tools\\clr -OfficialBuildId=$(OfficialBuildId) -Priority=$(Priority) -skiprestore -disableoss -- /flp:\"v=diag\"",
+ "arguments": "$(Architecture) $(PB_BuildType) skiptests skipbuildpackages $(PB_EnforcePGO) toolset_dir C:\\tools\\clr -OfficialBuildId=$(OfficialBuildId) -Priority=$(Priority) -skiprestore -- /p:SignType=$(PB_SignType) /flp:\"v=diag\"",
"workingFolder": "",
"failOnStandardError": "false"
}
@@ -106,7 +107,7 @@
"solution": "src\\sign.builds",
"platform": "",
"configuration": "",
- "msbuildArguments": "/p:SignType=$(SignType) /p:BuildType=$(PB_BuildType) /p:BuildArch=$(Architecture)",
+ "msbuildArguments": "/p:SignType=$(PB_SignType) /p:BuildType=$(PB_BuildType) /p:BuildArch=$(Architecture)",
"clean": "false",
"maximumCpuCount": "false",
"restoreNugetPackages": "false",
@@ -131,7 +132,7 @@
},
"inputs": {
"filename": "build-packages.cmd",
- "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) -- /p:OfficialBuildId=$(OfficialBuildId)",
+ "arguments": "-BuildArch=$(Architecture) -BuildType=$(PB_BuildType) -- /p:SignType=$(PB_SignType) /p:OfficialBuildId=$(OfficialBuildId)",
"workingFolder": "",
"failOnStandardError": "false"
}
@@ -278,7 +279,7 @@
"Label": {
"value": "$(Build.BuildNumber)"
},
- "SignType": {
+ "PB_SignType": {
"value": "test",
"allowOverride": true
},
diff --git a/buildpipeline/DotNet-Trusted-Publish.json b/buildpipeline/DotNet-Trusted-Publish.json
index a1f0e665c9..59c98095c0 100644
--- a/buildpipeline/DotNet-Trusted-Publish.json
+++ b/buildpipeline/DotNet-Trusted-Publish.json
@@ -25,13 +25,14 @@
"alwaysRun": false,
"displayName": "Install Signing Plugin",
"timeoutInMinutes": 0,
+ "condition": "and(succeeded(), ne(variables['PB_SignType'], 'oss'))",
"task": {
"id": "30666190-6959-11e5-9f96-f56098202fef",
"versionSpec": "1.*",
"definitionType": "task"
},
"inputs": {
- "signType": "real",
+ "signType": "$(PB_SignType)",
"zipSources": "true",
"version": "",
"feedSource": "https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json"
@@ -187,9 +188,9 @@
"inputs": {
"scriptType": "inlineScript",
"scriptName": "",
- "arguments": "-ApiKey $(MyGetApiKey) -ConfigurationGroup $(ConfigurationGroup) -PackagesGlob $(Pipeline.SourcesDirectory)\\packages\\AzureTransfer\\$(ConfigurationGroup)\\$(AzureContainerPackageGlob) -MyGetFeedUrl $(MyGetFeedUrl)",
+ "arguments": "-ApiKey $(MyGetApiKey) -ConfigurationGroup $(ConfigurationGroup) -PackagesGlob $(Pipeline.SourcesDirectory)\\packages\\AzureTransfer\\$(ConfigurationGroup)\\$(AzureContainerPackageGlob) -MyGetFeedUrl $(MyGetFeedUrl) -SignType $(PB_SignType)",
"workingFolder": "$(Pipeline.SourcesDirectory)",
- "inlineScript": "param($ApiKey, $ConfigurationGroup, $PackagesGlob, $MyGetFeedUrl)\n\nif ($ConfigurationGroup -ne \"Release\") { exit }\n\nmsbuild /t:NuGetPush /v:Normal `\n/p:NuGetExePath=$env:CustomNuGetPath `\n/p:NuGetApiKey=$ApiKey `\n/p:NuGetSource=$MyGetFeedUrl `\n/p:PackagesGlob=$PackagesGlob",
+ "inlineScript": "param($ApiKey, $ConfigurationGroup, $PackagesGlob, $MyGetFeedUrl, $SignType=\"unset\")\n\nif ($ConfigurationGroup.ToLower() -ne \"release\") { Write-host \"Chose not to publish\"; exit }\n\nmsbuild /t:NuGetPush /v:Normal `\n/p:NuGetExePath=$env:CustomNuGetPath `\n/p:NuGetApiKey=$ApiKey `\n/p:NuGetSource=$MyGetFeedUrl `\n/p:PackagesGlob=$PackagesGlob",
"failOnStandardError": "true"
}
},
@@ -207,49 +208,9 @@
"inputs": {
"scriptType": "inlineScript",
"scriptName": "",
- "arguments": "-ApiKey $(MyGetApiKey) -ConfigurationGroup $(ConfigurationGroup) -PackagesGlob $(Build.StagingDirectory)\\IndexedSymbolPackages\\*.nupkg -MyGetFeedUrl $(MyGetFeedUrl)",
+ "arguments": "-ApiKey $(MyGetApiKey) -ConfigurationGroup $(ConfigurationGroup) -PackagesGlob $(Build.StagingDirectory)\\IndexedSymbolPackages\\*.nupkg -MyGetFeedUrl $(MyGetFeedUrl) -SignType $(PB_SignType)",
"workingFolder": "$(Pipeline.SourcesDirectory)",
- "inlineScript": "param($ApiKey, $ConfigurationGroup, $PackagesGlob, $MyGetFeedUrl)\n\nif ($ConfigurationGroup -ne \"Release\") { exit }\nif ($env:SourceBranch.StartsWith(\"release/\")) { exit }\n\nmsbuild /t:NuGetPush /v:Normal `\n/p:NuGetExePath=$env:CustomNuGetPath `\n/p:NuGetApiKey=$ApiKey `\n/p:NuGetSource=$MyGetFeedUrl `\n/p:PackagesGlob=$PackagesGlob",
- "failOnStandardError": "true"
- }
- },
- {
- "enabled": false,
- "continueOnError": false,
- "alwaysRun": false,
- "displayName": "Create VSTS auth NuGet.Config",
- "timeoutInMinutes": 0,
- "task": {
- "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
- "versionSpec": "1.*",
- "definitionType": "task"
- },
- "inputs": {
- "scriptType": "inlineScript",
- "scriptName": "",
- "arguments": "$(VstsAuthedNuGetConfigPath) $(VstsFeedUrl) $(VstsPat)",
- "inlineScript": "param($path, $url, $pat)\n\nSet-Content $path @\"\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n <packageSources>\n <add key=\"vsts-dotnet-core\" value=\"$url\" />\n </packageSources>\n <packageSourceCredentials>\n <vsts-dotnet-core>\n <add key=\"Username\" value=\"VssSessionToken\" />\n <add key=\"ClearTextPassword\" value=\"$pat\" />\n </vsts-dotnet-core>\n </packageSourceCredentials>\n</configuration>\n\"@",
- "workingFolder": "",
- "failOnStandardError": "true"
- }
- },
- {
- "enabled": false,
- "continueOnError": false,
- "alwaysRun": false,
- "displayName": "packages -> VSTS",
- "timeoutInMinutes": 0,
- "task": {
- "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
- "versionSpec": "1.*",
- "definitionType": "task"
- },
- "inputs": {
- "scriptType": "inlineScript",
- "scriptName": "",
- "arguments": "",
- "inlineScript": "if ($env:ConfigurationGroup -ne \"Release\") { exit }\n& $env:CustomNuGetPath push $env:Pipeline.SourcesDirectory\\packages\\AzureTransfer\\$env:ConfigurationGroup\\$env:AzureContainerPackageGlob placeholderapikey -Source vsts-dotnet-core -ConfigFile $env:VstsAuthedNuGetConfigPath -Timeout 3600",
- "workingFolder": "",
+ "inlineScript": "param($ApiKey, $ConfigurationGroup, $PackagesGlob, $MyGetFeedUrl, $SignType=\"unset\")\n\nif ($ConfigurationGroup.ToLower() -ne \"release\") { Write-host \"Chose not to publish\"; exit }\nif ($env:SourceBranch.StartsWith(\"release/\")) { exit }\n\nmsbuild /t:NuGetPush /v:Normal `\n/p:NuGetExePath=$env:CustomNuGetPath `\n/p:NuGetApiKey=$ApiKey `\n/p:NuGetSource=$MyGetFeedUrl `\n/p:PackagesGlob=$PackagesGlob",
"failOnStandardError": "true"
}
},
@@ -267,8 +228,8 @@
"inputs": {
"scriptType": "inlineScript",
"scriptName": "",
- "arguments": "-gitHubAuthToken $(UpdatePublishedVersions.AuthToken) -root $(Pipeline.SourcesDirectory) -configGroup $(ConfigurationGroup)",
- "inlineScript": "param($gitHubAuthToken, $root, $configGroup)\nif ($configGroup -ne \"Release\") { exit }\ncd $root\n. $root\\UpdatePublishedVersions.ps1 `\n -gitHubUser dotnet-build-bot -gitHubEmail dotnet-build-bot@microsoft.com `\n -gitHubAuthToken $gitHubAuthToken `\n -versionsRepoOwner $env:VersionsRepoOwner -versionsRepo versions `\n -versionsRepoPath build-info/dotnet/$env:GitHubRepositoryName/$env:SourceBranch `\n -nupkgPath $root\\packages\\AzureTransfer\\$env:ConfigurationGroup\\$env:AzureContainerPackageGlob",
+ "arguments": "-gitHubAuthToken $(UpdatePublishedVersions.AuthToken) -root $(Pipeline.SourcesDirectory) -configGroup $(ConfigurationGroup) -SignType $(PB_SignType)",
+ "inlineScript": "param($gitHubAuthToken, $root, $configGroup, $SignType=\"unset\")\nif ($configGroup -ne \"Release\" -or $SignType.ToLower() -ne \"real\" ) { exit }\ncd $root\n. $root\\UpdatePublishedVersions.ps1 `\n -gitHubUser dotnet-build-bot -gitHubEmail dotnet-build-bot@microsoft.com `\n -gitHubAuthToken $gitHubAuthToken `\n -versionsRepoOwner $env:VersionsRepoOwner -versionsRepo versions `\n -versionsRepoPath build-info/dotnet/$env:GitHubRepositoryName/$env:SourceBranch `\n -nupkgPath $root\\packages\\AzureTransfer\\$env:ConfigurationGroup\\$env:AzureContainerPackageGlob",
"workingFolder": "",
"failOnStandardError": "true"
}
diff --git a/src/sign.builds b/src/sign.builds
index 831fe668c7..c87e3f877b 100644
--- a/src/sign.builds
+++ b/src/sign.builds
@@ -42,7 +42,7 @@
</Target>
<Target Name="Build"
- Condition="'$(SkipSigning)' != 'true' and '$(SignType)' != 'oss'"
+ Condition="'$(SkipSigning)' != 'true'"
DependsOnTargets="GetFilesToSignItems;SignFiles">
<!-- now that the files have been signed delete the marker files -->