Родитель
0674530fb3
Коммит
7c920f58de
|
@ -0,0 +1,21 @@
|
|||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,136 @@
|
|||
# Azure Pipelines
|
||||
# https://aka.ms/yaml
|
||||
|
||||
name: RecursiveExtractor_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
paths:
|
||||
include:
|
||||
- RecursiveExtractor
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
paths:
|
||||
include:
|
||||
- Pipelines
|
||||
- RecursiveExtractor
|
||||
- RecursiveExtractor.Blazor
|
||||
- RecursiveExtractor.Tests
|
||||
- RecursiveExtractor.sln
|
||||
|
||||
stages:
|
||||
- stage: Test
|
||||
jobs:
|
||||
- template: templates/dotnet-test-job.yml
|
||||
parameters:
|
||||
dotnetVersion: '3.1.x'
|
||||
projectPath: 'RecursiveExtractor.Tests/RecursiveExtractor.Tests.csproj'
|
||||
|
||||
- stage: SDL
|
||||
dependsOn: Test
|
||||
jobs:
|
||||
- template: templates/sdl-job.yml
|
||||
parameters:
|
||||
serviceTreeID: '1f6713ed-e0f1-4691-93a2-7e01bcf04acb'
|
||||
|
||||
- stage: Build
|
||||
dependsOn: Test
|
||||
jobs:
|
||||
- template: templates/nuget-build-job.yml
|
||||
parameters:
|
||||
dotnetVersion: '3.1.x'
|
||||
projectPath: 'RecursiveExtractor/RecursiveExtractor.csproj'
|
||||
projectName: 'RecursiveExtractor'
|
||||
|
||||
- stage: Release
|
||||
dependsOn:
|
||||
- SDL
|
||||
- Build
|
||||
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
|
||||
jobs:
|
||||
- job: sign_hash_release
|
||||
displayName: Code Sign, Generate Hashes, Publish Public Releases
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Unsigned Archives
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
downloadType: 'specific'
|
||||
itemPattern: 'Unsigned_Binaries/*.zip'
|
||||
downloadPath: '$(Build.BinariesDirectory)'
|
||||
- task: ExtractFiles@1
|
||||
displayName: Extract Artifacts for Signing
|
||||
inputs:
|
||||
archiveFilePatterns: '$(Build.BinariesDirectory)\*.zip'
|
||||
destinationFolder: '$(Build.BinariesDirectory)'
|
||||
cleanDestinationFolder: false
|
||||
- task: AntiMalware@3
|
||||
displayName: Anti-Malware Scan
|
||||
inputs:
|
||||
InputType: 'Basic'
|
||||
ScanType: 'CustomScan'
|
||||
FileDirPath: '$(Build.BinariesDirectory)'
|
||||
EnableServices: true
|
||||
SupportLogOnError: true
|
||||
TreatSignatureUpdateFailureAs: 'Warning'
|
||||
SignatureFreshness: 'UpToDate'
|
||||
TreatStaleSignatureAs: 'Warning'
|
||||
- task: UseDotNet@2
|
||||
inputs:
|
||||
packageType: 'sdk'
|
||||
version: '2.1.804'
|
||||
- task: EsrpCodeSigning@1
|
||||
displayName: Code Sign Nuget Packages
|
||||
inputs:
|
||||
ConnectedServiceName: 'RecursiveExtractor_CodeSign'
|
||||
FolderPath: '$(Build.BinariesDirectory)'
|
||||
Pattern: '*.nupkg, *.snupkg'
|
||||
signConfigType: 'inlineSignParams'
|
||||
inlineOperation: |
|
||||
[
|
||||
{
|
||||
"KeyCode" : "CP-401405",
|
||||
"OperationCode" : "NuGetSign",
|
||||
"Parameters" : {},
|
||||
"ToolName" : "sign",
|
||||
"ToolVersion" : "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode" : "CP-401405",
|
||||
"OperationCode" : "NuGetVerify",
|
||||
"Parameters" : {},
|
||||
"ToolName" : "sign",
|
||||
"ToolVersion" : "1.0"
|
||||
}
|
||||
]
|
||||
SessionTimeout: '60'
|
||||
MaxConcurrency: '50'
|
||||
MaxRetryAttempts: '5'
|
||||
- powershell: 'Get-ChildItem -Path ''$(Build.BinariesDirectory)'' -Recurse CodeSign* | foreach { Remove-Item -Path $_.FullName }'
|
||||
displayName: 'Delete Code Sign Summaries'
|
||||
- task: PowerShell@2
|
||||
displayName: Move NuGet Packages
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
mv $env:BUILD_BINARIESDIRECTORY/*.nupkg $env:BUILD_STAGINGDIRECTORY/
|
||||
mv $env:BUILD_BINARIESDIRECTORY/*.snupkg $env:BUILD_STAGINGDIRECTORY/
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: Pipeline Publish Signed Artifacts
|
||||
inputs:
|
||||
targetPath: '$(Build.StagingDirectory)'
|
||||
artifact: 'Signed_Binaries'
|
||||
- task: NuGetCommand@2
|
||||
displayName: Publish NuGet Packages
|
||||
inputs:
|
||||
command: 'push'
|
||||
packagesToPush: '$(Build.StagingDirectory)/*.nupkg'
|
||||
nuGetFeedType: 'external'
|
||||
publishFeedCredentials: 'CST-E Nuget CI'
|
||||
verbosityPush: 'Normal'
|
|
@ -0,0 +1,44 @@
|
|||
parameters:
|
||||
# Job Name
|
||||
- name: jobName
|
||||
type: string
|
||||
default: 'dotnet_test'
|
||||
# Version of Dotnet SDK to use
|
||||
- name: dotnetVersion
|
||||
type: string
|
||||
default: '3.1.x'
|
||||
# Version of NuGet Tool to use
|
||||
- name: nugetVersion
|
||||
type: string
|
||||
default: '5.x'
|
||||
# List of paths to .csproj
|
||||
- name: projectPath
|
||||
type: string
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
displayName: Dotnet Test
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
displayName: Install Dotnet SDK
|
||||
inputs:
|
||||
packageType: 'sdk'
|
||||
version: ${{ parameters.dotnetVersion }}
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Install Nuget Tool
|
||||
inputs:
|
||||
versionSpec: ${{ parameters.nugetVersion }}
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Dotnet Restore
|
||||
inputs:
|
||||
command: 'restore'
|
||||
projects: ${{ parameters.projectPath }}
|
||||
verbosityRestore: 'Normal'
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Dotnet Test
|
||||
inputs:
|
||||
command: 'test'
|
||||
projects: ${{ parameters.projectPath }}
|
|
@ -0,0 +1,82 @@
|
|||
parameters:
|
||||
# Job Name
|
||||
- name: jobName
|
||||
type: string
|
||||
default: 'nuget_pack'
|
||||
# Version of Dotnet SDK to use
|
||||
- name: dotnetVersion
|
||||
type: string
|
||||
default: '3.1.x'
|
||||
# Version of NuGet Tool to use
|
||||
- name: nugetVersion
|
||||
type: string
|
||||
default: '5.x'
|
||||
# Path to .csproj or .sln
|
||||
- name: projectPath
|
||||
type: string
|
||||
default: ''
|
||||
# Build Configuration
|
||||
- name: buildConfiguration
|
||||
type: string
|
||||
default: 'Release'
|
||||
# Project Name
|
||||
- name: projectName
|
||||
type: string
|
||||
default: ''
|
||||
# Pipeline Artifact Name
|
||||
- name: artifactName
|
||||
type: string
|
||||
default: 'Unsigned_Binaries'
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
displayName: NuGet Package
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
displayName: Install Dotnet SDK
|
||||
inputs:
|
||||
packageType: 'sdk'
|
||||
version: ${{ parameters.dotnetVersion }}
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Install Nuget Tool
|
||||
inputs:
|
||||
versionSpec: ${{ parameters.nugetVersion }}
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Dotnet Restore
|
||||
inputs:
|
||||
command: 'restore'
|
||||
projects: ${{ parameters.projectPath }}
|
||||
verbosityRestore: 'Normal'
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Pack Nupkg
|
||||
inputs:
|
||||
command: 'custom'
|
||||
custom: 'pack'
|
||||
arguments: '${{ parameters.projectPath }} -c ${{ parameters.buildConfiguration }} -o Packages'
|
||||
- task: AntiMalware@3
|
||||
displayName: Anti-Malware Scan
|
||||
inputs:
|
||||
InputType: 'Basic'
|
||||
ScanType: 'CustomScan'
|
||||
FileDirPath: 'Packages'
|
||||
EnableServices: true
|
||||
SupportLogOnError: true
|
||||
TreatSignatureUpdateFailureAs: 'Warning'
|
||||
SignatureFreshness: 'UpToDate'
|
||||
TreatStaleSignatureAs: 'Warning'
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Archive Packages
|
||||
inputs:
|
||||
rootFolderOrFile: 'Packages'
|
||||
includeRootFolder: false
|
||||
archiveType: 'zip'
|
||||
archiveFile: 'Archives\${{ parameters.projectName }}_NuGet.zip'
|
||||
replaceExistingArchive: true
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Pipeline Publish Archive
|
||||
inputs:
|
||||
PathtoPublish: 'Archives'
|
||||
ArtifactName: '${{ parameters.artifactName }}'
|
||||
publishLocation: 'Container'
|
|
@ -0,0 +1,25 @@
|
|||
parameters:
|
||||
# Service Tree ID of application
|
||||
- name: serviceTreeID
|
||||
type: string
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
- job: sdl_tools
|
||||
displayName: SDL Tools
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
steps:
|
||||
- task: CodeInspector@2
|
||||
inputs:
|
||||
ProductId: ${{ parameters.serviceTreeID }}
|
||||
continueOnError: true
|
||||
- task: CredScan@3
|
||||
inputs:
|
||||
verboseOutput: true
|
||||
- task: notice@0
|
||||
inputs:
|
||||
outputformat: 'text'
|
||||
- task: SdtReport@2
|
||||
inputs:
|
||||
GdnExportAllTools: true
|
|
@ -8,7 +8,7 @@
|
|||
<Authors>Microsoft</Authors>
|
||||
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
|
||||
<RepositoryType>GitHub</RepositoryType>
|
||||
<RepositoryUrl>https://github.com/Microsoft/OSSGadget</RepositoryUrl>
|
||||
<RepositoryUrl>https://github.com/Microsoft/RecursiveExtractor</RepositoryUrl>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<Nullable>Enable</Nullable>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<PackageId>Microsoft.CST.RecursiveExtractor</PackageId>
|
||||
<PackageTags>unzip extract extractor</PackageTags>
|
||||
<PackageVersion>0.0.0-placeholder</PackageVersion>
|
||||
<PackageProjectUrl>https://github.com/microsoft/OSSGadget</PackageProjectUrl>
|
||||
<PackageProjectUrl>https://github.com/microsoft/RecursiveExtractor</PackageProjectUrl>
|
||||
<PackageIcon>icon-128.png</PackageIcon>
|
||||
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
|
@ -48,7 +48,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\LICENSE.txt" Pack="true" PackagePath="" />
|
||||
<None Include="..\..\..\icon-128.png" Pack="true" PackagePath="" />
|
||||
<None Include="..\LICENSE.txt" Pack="true" PackagePath="" />
|
||||
<None Include="..\icon-128.png" Pack="true" PackagePath="" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 4.0 KiB |
Загрузка…
Ссылка в новой задаче