Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit f4a3040

Browse files
authored
Merge pull request #14262 from MattGal/build_def_updates
Fix up some publish behaviors
2 parents fb7c827 + f1959bb commit f4a3040

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

buildpipeline/DotNet-Trusted-Publish.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"alwaysRun": false,
2626
"displayName": "Fetch custom tooling (NuGet, EmbedIndex)",
2727
"timeoutInMinutes": 0,
28-
"condition": "and(succeeded(), ne(variables['PB_SignType'], 'oss'))",
28+
"condition": "succeeded()",
2929
"task": {
3030
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
3131
"versionSpec": "1.*",
@@ -152,9 +152,9 @@
152152
"inputs": {
153153
"scriptType": "inlineScript",
154154
"scriptName": "",
155-
"arguments": "-ApiKey $(MyGetApiKey) -ConfigurationGroup $(ConfigurationGroup) -PackagesGlob $(Pipeline.SourcesDirectory)\\packages\\AzureTransfer\\$(ConfigurationGroup)\\$(AzureContainerPackageGlob) -MyGetFeedUrl $(MyGetFeedUrl) -SignType $(PB_SignType)",
155+
"arguments": "-ApiKey $(MyGetApiKey) -ConfigurationGroup $(ConfigurationGroup) -PackagesGlob $(Pipeline.SourcesDirectory)\\packages\\AzureTransfer\\$(ConfigurationGroup)\\$(AzureContainerPackageGlob) -MyGetFeedUrl $(MyGetFeedUrl)",
156156
"workingFolder": "$(Pipeline.SourcesDirectory)",
157-
"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",
157+
"inlineScript": "param($ApiKey, $ConfigurationGroup, $PackagesGlob, $MyGetFeedUrl)\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",
158158
"failOnStandardError": "true"
159159
}
160160
},
@@ -172,9 +172,9 @@
172172
"inputs": {
173173
"scriptType": "inlineScript",
174174
"scriptName": "",
175-
"arguments": "-ApiKey $(MyGetApiKey) -ConfigurationGroup $(ConfigurationGroup) -PackagesGlob $(Build.StagingDirectory)\\IndexedSymbolPackages\\*.nupkg -MyGetFeedUrl $(MyGetFeedUrl) -SignType $(PB_SignType)",
175+
"arguments": "-ApiKey $(MyGetApiKey) -ConfigurationGroup $(ConfigurationGroup) -PackagesGlob $(Build.StagingDirectory)\\IndexedSymbolPackages\\*.nupkg -MyGetFeedUrl $(MyGetFeedUrl)",
176176
"workingFolder": "$(Pipeline.SourcesDirectory)",
177-
"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",
177+
"inlineScript": "param($ApiKey, $ConfigurationGroup, $PackagesGlob, $MyGetFeedUrl)\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",
178178
"failOnStandardError": "true"
179179
}
180180
},
@@ -192,8 +192,8 @@
192192
"inputs": {
193193
"scriptType": "inlineScript",
194194
"scriptName": "",
195-
"arguments": "-gitHubAuthToken $(UpdatePublishedVersions.AuthToken) -root $(Pipeline.SourcesDirectory) -configGroup $(ConfigurationGroup) -SignType $(PB_SignType)",
196-
"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 [email protected] `\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",
195+
"arguments": "-gitHubAuthToken $(UpdatePublishedVersions.AuthToken) -root $(Pipeline.SourcesDirectory) -configGroup $(ConfigurationGroup)",
196+
"inlineScript": "param($gitHubAuthToken, $root, $configGroup)\nif ($configGroup -ne \"Release\" ) { exit }\ncd $root\n. $root\\UpdatePublishedVersions.ps1 `\n -gitHubUser dotnet-build-bot -gitHubEmail [email protected] `\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",
197197
"workingFolder": "",
198198
"failOnStandardError": "true"
199199
}

0 commit comments

Comments
 (0)