Merge pull request #1058 from AArnott/libtemplateUpdate
Merge latest Library.Template
This commit is contained in:
Коммит
2b2d17b2b6
|
@ -3,7 +3,7 @@
|
|||
"isRoot": true,
|
||||
"tools": {
|
||||
"powershell": {
|
||||
"version": "7.4.2",
|
||||
"version": "7.4.3",
|
||||
"commands": [
|
||||
"pwsh"
|
||||
]
|
||||
|
@ -21,4 +21,4 @@
|
|||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -352,3 +352,6 @@ MigrationBackup/
|
|||
|
||||
# mac-created file to track user view preferences for a directory
|
||||
.DS_Store
|
||||
|
||||
# Analysis results
|
||||
*.sarif
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<BaseIntermediateOutputPath>$(RepoRootPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\</BaseIntermediateOutputPath>
|
||||
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRootPath)bin\$(MSBuildProjectName)\</BaseOutputPath>
|
||||
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\NuGet\</PackageOutputPath>
|
||||
<LangVersion>12</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<AnalysisLevel>latest</AnalysisLevel>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<LangVersion Condition="'$(Language)'=='C#'">12</LangVersion>
|
||||
<LangVersion Condition="'$(Language)'=='VB'">16.9</LangVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!-- Avoid compile error about missing namespace when combining ImplicitUsings with .NET Framework target frameworks. -->
|
||||
<Using Remove="System.Net.Http" Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'" />
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
.PARAMETER SourceCodeArchivalUri
|
||||
The URI to POST the source code archival request to.
|
||||
This value will typically come automatically by a variable group associated with your pipeline.
|
||||
You can also look it up at https://dpsrequestforms.azurewebsites.net/#/help -> SCA Request Help -> SCA API Help -> Description
|
||||
You can also look it up at https://dpsopsrequestforms.azurewebsites.net/#/help -> SCA Request Help -> SCA API Help -> Description
|
||||
#>
|
||||
[CmdletBinding(SupportsShouldProcess = $true, PositionalBinding = $false)]
|
||||
param (
|
||||
|
@ -76,7 +76,9 @@ param (
|
|||
[Parameter()]
|
||||
[string]$ServerPath = '',
|
||||
[Parameter()]
|
||||
[Uri]$SourceCodeArchivalUri = $env:SOURCECODEARCHIVALURI
|
||||
[Uri]$SourceCodeArchivalUri = $env:SOURCECODEARCHIVALURI,
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$AccessToken
|
||||
)
|
||||
|
||||
function Invoke-Git() {
|
||||
|
@ -199,9 +201,13 @@ if ($PSCmdlet.ShouldProcess('source archival request', 'post')) {
|
|||
exit 1
|
||||
}
|
||||
|
||||
$headers = @{
|
||||
'Authorization' = "Bearer $AccessToken"
|
||||
}
|
||||
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
$Response = Invoke-WebRequest -Uri $SourceCodeArchivalUri -Method POST -Body $RequestJson -ContentType "application/json" -UseBasicParsing -SkipHttpErrorCheck
|
||||
$Response = Invoke-WebRequest -Uri $SourceCodeArchivalUri -Method POST -Headers $headers -Body $RequestJson -ContentType "application/json" -UseBasicParsing -SkipHttpErrorCheck
|
||||
Write-Host "Status Code : " -NoNewline
|
||||
if ($Response.StatusCode -eq 200) {
|
||||
Write-Host $Response.StatusCode -ForegroundColor Green
|
||||
|
|
|
@ -63,7 +63,16 @@ extends:
|
|||
- powershell: azure-pipelines/variables/_pipelines.ps1
|
||||
failOnStderr: true
|
||||
displayName: ⚙ Set pipeline variables based on source
|
||||
- powershell: >
|
||||
- task: AzureCLI@2
|
||||
displayName: 🔏 Authenticate with WIF service connection
|
||||
inputs:
|
||||
azureSubscription: VS Core Source Code Archival
|
||||
scriptType: pscore
|
||||
scriptLocation: inlineScript
|
||||
inlineScript: |
|
||||
$accessToken = az account get-access-token --query accessToken --resource api://177cf50a-4bf5-4481-8b7e-f32900dfc8e6 -o tsv
|
||||
Write-Host "##vso[task.setvariable variable=scaToken;issecret=true]$accessToken"
|
||||
- pwsh: >
|
||||
$TeamAlias = '$(TeamEmail)'.Substring(0, '$(TeamEmail)'.IndexOf('@'))
|
||||
|
||||
azure-pipelines/Archive-SourceCode.ps1
|
||||
|
@ -73,6 +82,7 @@ extends:
|
|||
-ProductName '$(SymbolsFeatureName)'
|
||||
-ProductLanguage English
|
||||
-Notes '${{ parameters.notes }}'
|
||||
-AccessToken '$(scaToken)'
|
||||
-Verbose
|
||||
-WhatIf:$${{ parameters.whatif }}
|
||||
displayName: 🗃️ Submit archival request
|
||||
|
|
|
@ -11,7 +11,7 @@ steps:
|
|||
displayName: 🔍 Verify Signed Files
|
||||
inputs:
|
||||
TargetFolders: |
|
||||
$(Build.SourcesDirectory)/bin/Packages/$(BuildConfiguration)/NuGet
|
||||
$(Build.SourcesDirectory)/bin/Packages/$(BuildConfiguration)
|
||||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
|
||||
|
||||
- ${{ if parameters.IsOptProf }}:
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
' Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
' Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
<Assembly: DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)>
|
|
@ -1,7 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.cs" Condition=" '$(Language)'=='C#' " />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.vb" Condition=" '$(Language)'=='VB' " />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче