diff --git a/WinGetUtil.nuspec b/WinGetUtil.nuspec deleted file mode 100644 index a48047c359..0000000000 --- a/WinGetUtil.nuspec +++ /dev/null @@ -1,31 +0,0 @@ - - - - Microsoft.WindowsPackageManager.Utils - $version$ - - Microsoft - - https://github.com/microsoft/winget-cli - MIT - true - The utility binary for use with the WinGet CLI. - © Microsoft Corporation. All rights reserved. - winget - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/azure-pipelines.coverage.yml b/azure-pipelines.coverage.yml deleted file mode 100644 index 8d94e1a4f3..0000000000 --- a/azure-pipelines.coverage.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Code coverage pipeline required by OneFuzz -pr: none -trigger: none - -pool: - vmImage: windows-latest - -parameters: - - name: sasUrl - type: string - displayName: SAS URL - - name: branch - type: string - displayName: Branch - - name: jobID - type: string - displayName: OneFuzz Job ID - - name: buildDate - type: string - displayName: Build Date - - name: commitID - type: string - displayName: Commit ID - -variables: - - name: coverage-file - value: cobertura-coverage.xml - - name: job-ID - value: ${{ parameters.jobID }} - - name: build-date - value: ${{ parameters.buildDate }} - - name: branch - value: ${{ parameters.branch }} - - name: sas-url - value: ${{ parameters.sasUrl }} - - name: commit-ID - value: ${{ parameters.commitID }} - -jobs: -- job: prod - displayName: Prod Task - steps: - # Get source code - - script: | - git clone https://github.com/microsoft/winget-cli.git - git checkout $(commit-ID) - displayName: 'Clone winget-cli' - - # Get code coverage from OneFuzz for the job - - powershell: | - Write-Host "Job ID: $(job-ID), Build Date: $(build-date), Branch: $(branch)" - $SASUrl = [System.Uri]::new("$(sas-url)") - azcopy cp $SASUrl.AbsoluteUri ./ --recursive - $ContainerName = $SASURL.LocalPath.Split("/")[1] - Write-Host "##vso[task.setvariable variable=container-name;]$ContainerName" - cd $ContainerName - $size = ((Get-Item .\$(coverage-file)).length) - if ($size -eq 0) { - Write-Host "Cobertura coverage XML is empty." - exit 1 - } - displayName: PowerShell script to get coverage - - # Use Cobertura report generator - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: 'Cobertura' - summaryFileLocation: ./$(container-name)\$(coverage-file) - pathToSources: $(System.DefaultWorkingDirectory) - displayName: Built in ADO Task that uses ReportGenerator \ No newline at end of file diff --git a/azure-pipelines.nuget.yml b/azure-pipelines.nuget.yml deleted file mode 100644 index 27b46300b5..0000000000 --- a/azure-pipelines.nuget.yml +++ /dev/null @@ -1,213 +0,0 @@ -trigger: none - -parameters: - - name: version - displayName: Version to stamp on binaries and nuget package. Should be in form of "major.minor", for example "1.0" - type: string - -pool: - vmImage: "windows-latest" - -variables: - solution: "src/AppInstallerCLI.sln" - packageName: Microsoft.WindowsPackageManager.Utils - buildVer: $[counter(${{ parameters.version }}, 1)] - version: ${{ parameters.version }}.$(buildVer) - EnableDetectorVcpkg: true - -jobs: - - job: "Build" - timeoutInMinutes: 120 - strategy: - matrix: - x86_release: - buildConfiguration: 'Release' - buildPlatform: 'x86' - x64_release: - buildConfiguration: 'Release' - buildPlatform: 'x64' - variables: - artifactsDir: $(Build.ArtifactStagingDirectory)\$(buildPlatform) - steps: - - script: echo $(version) - - - task: NuGetToolInstaller@1 - displayName: Install Nuget - - # Restores all projects, including native (vcxproj) projects - - task: NuGetCommand@2 - displayName: Restore Solution - inputs: - restoreSolution: "$(solution)" - - # Restore these UAP packages as https://github.com/NuGet/Home/issues/7796 leads to all UAP packages being skipped for restore. - # Even though they don't need any actual restore action, they need the project.assets.json file to be created and a direct restore does that. - - task: NuGetCommand@2 - displayName: Restore AppInstallerCLIPackage - inputs: - restoreSolution: 'src\AppInstallerCLIPackage\AppInstallerCLIPackage.wapproj' - - - task: NuGetCommand@2 - displayName: Restore AppInstallerTestMsixInstaller - inputs: - restoreSolution: 'src\AppInstallerTestMsixInstaller\AppInstallerTestMsixInstaller.wapproj' - - # Restores only .NET core projects, but is still necessary, as without this the IndexCreationTool and LocalhostWebServer projects fail to build - - task: DotNetCoreCLI@2 - displayName: DotNet Restore - inputs: - command: "restore" - projects: "**/*.csproj" - - - task: CmdLine@2 - displayName: Enable Vcpkg Install - inputs: - script: | - $(VCPKG_INSTALLATION_ROOT)\vcpkg.exe integrate install - workingDirectory: '$(VCPKG_INSTALLATION_ROOT)' - - - task: PowerShell@2 - displayName: Update Binary Version - condition: not(eq(variables['Build.Reason'], 'PullRequest')) - inputs: - filePath: 'src\binver\Update-BinVer.ps1' - arguments: '-TargetFile binver\binver\version.h -BuildVersion $(buildVer) -MajorMinorOverride ${{ parameters.version }}' - workingDirectory: "src" - - - task: VSBuild@1 - displayName: Build Solution - inputs: - platform: "$(buildPlatform)" - solution: "$(solution)" - configuration: "$(buildConfiguration)" - - - task: EsrpCodeSigning@5 - displayName: "ESRP CodeSigning - Package contents" - inputs: - ConnectedServiceName: "WindowsPackageManager ESRP CodeSigning" - AppRegistrationClientId: '32216f16-efc9-4013-9fae-c6a2c54a3fc0' - AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47' - AuthAKVName: 'PeetDevOpsKeyVault' - AuthCertName: 'ESRPAuth' - AuthSignCertName: 'ESRPRequestSigning' - FolderPath: src - Pattern: | - *\$(buildConfiguration)\WinGetUtil\WinGetUtil.dll - WinGetUtilInterop\bin\$(buildConfiguration)\netstandard2.1\WinGetUtilInterop.dll - UseMinimatch: true - signConfigType: inlineSignParams - inlineOperation: | - [ - { - "KeyCode" : "CP-230012", - "OperationCode" : "SigntoolSign", - "Parameters" : { - "OpusName" : "Microsoft", - "OpusInfo" : "http://www.microsoft.com", - "FileDigest" : "/fd \"SHA256\"", - "PageHash" : "/NPH", - "TimeStamp" : "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" - }, - "ToolName" : "sign", - "ToolVersion" : "1.0" - }, - { - "KeyCode" : "CP-230012", - "OperationCode" : "SigntoolVerify", - "Parameters" : {}, - "ToolName" : "sign", - "ToolVersion" : "1.0" - } - ] - - - task: CopyFiles@2 - displayName: 'Copy nuget pack files to artifacts folder' - inputs: - Contents: | - WinGetUtil.nuspec - src\$(buildPlatform)\$(buildConfiguration)\WinGetUtil\WinGetUtil.dll - src\$(buildPlatform)\$(buildConfiguration)\WinGetUtil\WinGetUtil.pdb - src\WinGetUtilInterop\bin\$(buildConfiguration)\netstandard2.1\WinGetUtilInterop.dll - src\WinGetUtilInterop\bin\$(buildConfiguration)\netstandard2.1\WinGetUtilInterop.pdb - src\WinGetUtilInterop\build\Microsoft.WindowsPackageManager.Utils.targets - schemas\JSON\manifests\** - TargetFolder: '$(artifactsDir)' - - - task: PublishPipelineArtifact@1 - displayName: Publish Pipeline Artifacts - inputs: - targetPath: '$(artifactsDir)' - - - job: "Nuget" - timeoutInMinutes: 60 - dependsOn: 'Build' - steps: - - checkout: none - - - task: DownloadPipelineArtifact@2 - displayName: 'Download Build.x64release artifacts' - inputs: - artifactName: Build.x64release - targetPath: '$(Pipeline.Workspace)\Build.x64release' - - - task: DownloadPipelineArtifact@2 - displayName: 'Download Build.x86release artifacts' - inputs: - artifactName: Build.x86release - targetPath: '$(Pipeline.Workspace)\Build.x86release' - - - task: NuGetCommand@2 - displayName: Pack WingetUtil nuget package - inputs: - command: pack - packagesToPack: '$(Pipeline.Workspace)\Build.x64release\WinGetUtil.nuspec' - versioningScheme: byEnvVar - versionEnvVar: version - packDestination: '$(Build.ArtifactStagingDirectory)' - basePath: $(Pipeline.Workspace) - - - task: EsrpCodeSigning@5 - displayName: "ESRP CodeSigning - NuGet package" - inputs: - ConnectedServiceName: "WindowsPackageManager ESRP CodeSigning" - AppRegistrationClientId: '32216f16-efc9-4013-9fae-c6a2c54a3fc0' - AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47' - AuthAKVName: 'PeetDevOpsKeyVault' - AuthCertName: 'ESRPAuth' - AuthSignCertName: 'ESRPRequestSigning' - FolderPath: "$(Build.ArtifactStagingDirectory)" - Pattern: "$(packageName).$(version).nupkg" - 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" - } - ] - - - task: PublishBuildArtifacts@1 - displayName: Publish nuget package to artifacts - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\$(packageName).$(version).nupkg' - ArtifactName: $(packageName) - publishLocation: Container - - - task: NuGetCommand@2 - displayName: Push WingetUtil nuget package to nuget.org - inputs: - command: push - nuGetFeedType: external - includeNugetOrg: true - packagesToPush: '$(Build.ArtifactStagingDirectory)\$(packageName).$(version).nupkg' - publishFeedCredentials: "WindowsPackageManagerAzurePipelineNuget - NuGet.org"