Hello GitHub
This commit is contained in:
62
build/pipelines/templates/build-app-internal.yaml
Normal file
62
build/pipelines/templates/build-app-internal.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
# This template contains a job to build the app for a single architecture and run static analysis
|
||||
# tools on the binaries.
|
||||
# The app is built in a production configuration to be released to the Store and the Windows image.
|
||||
# This job relies on Microsoft-internal resources to run.
|
||||
|
||||
parameters:
|
||||
platform: ''
|
||||
condition: ''
|
||||
|
||||
jobs:
|
||||
- job: Build${{ parameters.platform }}
|
||||
displayName: Build ${{ parameters.platform }}
|
||||
condition: ${{ parameters.condition }}
|
||||
pool:
|
||||
name: Package ES Custom Demands Lab A
|
||||
demands:
|
||||
- msbuild
|
||||
- visualstudio
|
||||
- ClientAlias -equals PKGESUTILAPPS
|
||||
variables:
|
||||
BuildConfiguration: Release
|
||||
BuildPlatform: ${{ parameters.platform }}
|
||||
workspace:
|
||||
clean: outputs
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
- task: UniversalPackages@0
|
||||
displayName: Download internals package
|
||||
inputs:
|
||||
command: download
|
||||
downloadDirectory: $(Build.SourcesDirectory)
|
||||
vstsFeed: WindowsApps
|
||||
vstsFeedPackage: calculator-internals
|
||||
vstsPackageVersion: 0.0.7
|
||||
|
||||
- template: ./build-single-architecture.yaml
|
||||
parameters:
|
||||
extraMsBuildArgs: '/p:IsStoreBuild=true'
|
||||
|
||||
- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3
|
||||
displayName: Run BinSkim
|
||||
inputs:
|
||||
inputType: Basic
|
||||
analyzeTarget: $(Build.BinariesDirectory)\$(BuildConfiguration)\$(BuildPlatform)\Calculator\*
|
||||
analyzeVerbose: true
|
||||
analyzeHashes: true
|
||||
continueOnError: true
|
||||
|
||||
- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1
|
||||
displayName: Run PoliCheck
|
||||
inputs:
|
||||
targetType: F
|
||||
|
||||
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
|
||||
displayName: Publish security analysis logs
|
||||
|
||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||
displayName: Detect open source components
|
||||
inputs:
|
||||
sourceScanPath: $(Agent.BuildDirectory)
|
27
build/pipelines/templates/build-app-public.yaml
Normal file
27
build/pipelines/templates/build-app-public.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
# This template contains a job to build the app for a single architecture.
|
||||
# Only the contents of the public repository are built; internal resources are not used.
|
||||
|
||||
parameters:
|
||||
platform: ''
|
||||
condition: ''
|
||||
|
||||
jobs:
|
||||
- job: Build${{ parameters.platform }}
|
||||
displayName: Build ${{ parameters.platform }}
|
||||
condition: ${{ parameters.condition }}
|
||||
pool:
|
||||
name: Package ES Custom Demands Lab A
|
||||
demands:
|
||||
- msbuild
|
||||
- visualstudio
|
||||
- ClientAlias -equals PKGESUTILAPPS
|
||||
variables:
|
||||
BuildConfiguration: Release
|
||||
BuildPlatform: ${{ parameters.platform }}
|
||||
workspace:
|
||||
clean: outputs
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
- template: ./build-single-architecture.yaml
|
53
build/pipelines/templates/build-single-architecture.yaml
Normal file
53
build/pipelines/templates/build-single-architecture.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
# This template contains steps to build the app for a single architecture.
|
||||
# The job containing these steps must set the variables 'BuildConfiguration' and 'BuildPlatform'.
|
||||
|
||||
parameters:
|
||||
extraMsBuildArgs: ''
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@0
|
||||
displayName: Use NuGet 4.7.1
|
||||
inputs:
|
||||
versionSpec: 4.7.1
|
||||
checkLatest: true
|
||||
|
||||
# In most accounts, you can just use 'NuGetCommand' instead of this GUID.
|
||||
# In the microsoft.visualstudio.com account, NuGetCommand is ambiguous so the GUID is needed.
|
||||
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
|
||||
displayName: NuGet restore src/Calculator.sln
|
||||
inputs:
|
||||
command: custom
|
||||
arguments: restore src/Calculator.sln -Verbosity Detailed -NonInteractive
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Set version number in AppxManifest
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)\build\scripts\UpdateAppxManifestVersion.ps1
|
||||
arguments: '-AppxManifest $(Build.SourcesDirectory)\src\Calculator\Package.appxmanifest -Version $(Build.BuildNumber)'
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build solution src/Calculator.sln'
|
||||
inputs:
|
||||
solution: src/Calculator.sln
|
||||
vsVersion: 15.0
|
||||
msbuildArgs: /bl:$(Build.BinariesDirectory)\$(BuildConfiguration)\$(BuildPlatform)\Calculator.binlog /p:OutDir=$(Build.BinariesDirectory)\$(BuildConfiguration)\$(BuildPlatform)\ /p:GenerateProjectSpecificOutputFolder=true /p:AppVersion=$(Build.BuildNumber) ${{ parameters.extraMsBuildArgs }}
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
clean: true
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish drop artifact
|
||||
inputs:
|
||||
artifactName: drop
|
||||
pathToPublish: $(Build.BinariesDirectory)
|
||||
parallel: true
|
||||
|
||||
- task: PublishSymbols@2
|
||||
displayName: Publish symbols
|
||||
inputs:
|
||||
symbolsFolder: $(Build.BinariesDirectory)\$(BuildConfiguration)\$(BuildPlatform)
|
||||
searchPattern: '**/*.pdb'
|
||||
symbolServerType: teamServices
|
||||
treatNotIndexedAsWarning: true
|
||||
symbolsArtifactName: $(System.teamProject)/$(Build.BuildNumber)_$(BuildPlatform)$(BuildConfiguration)
|
61
build/pipelines/templates/package-appxbundle.yaml
Normal file
61
build/pipelines/templates/package-appxbundle.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
# This template contains a job which takes .appx packages which were built separately for each
|
||||
# architecture (arm, x86, etc.) and combines them into a single .appxbundle.
|
||||
|
||||
jobs:
|
||||
- job: Package
|
||||
dependsOn:
|
||||
- Buildx64
|
||||
- Buildx86
|
||||
- BuildARM
|
||||
- BuildARM64
|
||||
condition: |
|
||||
and
|
||||
(
|
||||
in(dependencies.Buildx64.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
|
||||
in(dependencies.Buildx86.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
|
||||
in(dependencies.BuildARM.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
|
||||
in(dependencies.BuildARM64.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
|
||||
)
|
||||
pool:
|
||||
name: Package ES Custom Demands Lab A
|
||||
demands:
|
||||
- msbuild
|
||||
- visualstudio
|
||||
- ClientAlias -equals PKGESUTILAPPS
|
||||
workspace:
|
||||
clean: outputs
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download all .appx artifacts
|
||||
inputs:
|
||||
artifactName: drop
|
||||
itemPattern: '**/*.appx'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Generate AppxBundle mapping
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)\build\scripts\CreateAppxBundleMapping.ps1
|
||||
arguments: '-InputPath $(Build.ArtifactStagingDirectory)\drop\Release -ProjectName Calculator -OutputFile $(Build.BinariesDirectory)\AppxBundleMapping.txt'
|
||||
|
||||
- script: '"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\MakeAppx.exe" bundle /v /bv %BUNDLEVERSION% /f %MAPPINGFILEPATH% /p %OUTPUTPATH%'
|
||||
displayName: Make AppxBundle
|
||||
env:
|
||||
BUNDLEVERSION: $(Build.BuildNumber)
|
||||
MAPPINGFILEPATH: $(Build.BinariesDirectory)\AppxBundleMapping.txt
|
||||
OUTPUTPATH: $(Build.BinariesDirectory)\Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy AppxBundle to staging directory
|
||||
inputs:
|
||||
sourceFolder: $(Build.BinariesDirectory)
|
||||
contents: Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\appxBundle
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish AppxBundle artifact
|
||||
inputs:
|
||||
artifactName: appxBundle
|
||||
pathToPublish: $(Build.ArtifactStagingDirectory)\appxBundle
|
111
build/pipelines/templates/prepare-release-internalonly.yaml
Normal file
111
build/pipelines/templates/prepare-release-internalonly.yaml
Normal file
@@ -0,0 +1,111 @@
|
||||
# This template contains a job which builds artifacts needed to release the app to the store and to
|
||||
# Windows using Microsoft-internal systems. It relies Microsoft-internal resources and will not
|
||||
# work outside of Microsoft.
|
||||
# Specifically, this job:
|
||||
# - Signs the bundle using a secure system. If you want to build your own, use SignTool following
|
||||
# the example in the continuous integration pipeline.
|
||||
# - Builds VPacks for including the app in the Windows OS build. Azure DevOps Universal Packages
|
||||
# offers similar capabilities.
|
||||
# - Creates StoreBroker packages containing Microsoft Store assets. Although the Store assets for
|
||||
# this app are not open source, the StoreBroker tool is available at
|
||||
# https://github.com/Microsoft/StoreBroker.
|
||||
|
||||
jobs:
|
||||
- job: WindowsInternalRelease
|
||||
dependsOn: Package
|
||||
pool:
|
||||
name: Package ES Custom Demands Lab A
|
||||
demands:
|
||||
- ClientAlias -equals PKGESUTILAPPS
|
||||
workspace:
|
||||
clean: outputs
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
# This must be the first task in the job definition, since it modifies the build environment
|
||||
# in ways other tasks would not expect (for example, it clears the artifacts directory).
|
||||
- task: PkgESSetupBuild@10
|
||||
displayName: Initialize Package ES
|
||||
inputs:
|
||||
productName: Calculator
|
||||
disableWorkspace: true
|
||||
env:
|
||||
XES_DISABLEPROV: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download appxBundle artifact
|
||||
inputs:
|
||||
artifactName: appxBundle
|
||||
|
||||
- task: PkgESCodeSign@10
|
||||
displayName: Send bundle to Package ES code signing service
|
||||
inputs:
|
||||
signConfigXml: build\config\SignConfig.xml
|
||||
inPathRoot: $(Build.ArtifactStagingDirectory)\appxBundle
|
||||
outPathRoot: $(Build.ArtifactStagingDirectory)\appxBundleSigned
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish AppxBundleSigned artifact
|
||||
inputs:
|
||||
pathtoPublish: $(Build.ArtifactStagingDirectory)\appxBundleSigned
|
||||
artifactName: AppxBundleSigned
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy signed AppxBundle to vpack staging folder
|
||||
inputs:
|
||||
sourceFolder: $(Build.ArtifactStagingDirectory)\appxBundleSigned
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\vpack\appxBundle
|
||||
|
||||
- task: PkgESVPack@10
|
||||
displayName: Create and push vpack for app
|
||||
env:
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
inputs:
|
||||
sourceDirectory: $(Build.ArtifactStagingDirectory)\vpack\appxBundle
|
||||
description: VPack for the Calculator Application
|
||||
pushPkgName: calculator.app
|
||||
version: $(versionMajor).$(versionMinor).$(versionBuild)
|
||||
owner: paxeeapps
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish vpack\app artifact with vpack manifest
|
||||
inputs:
|
||||
pathtoPublish: $(XES_VPACKMANIFESTDIRECTORY)\$(XES_VPACKMANIFESTNAME)
|
||||
artifactName: vpack\app
|
||||
|
||||
# TODO (macool): create and push internal test packages and test config
|
||||
|
||||
- task: UniversalPackages@0
|
||||
displayName: Download internals package
|
||||
inputs:
|
||||
command: download
|
||||
downloadDirectory: $(Build.SourcesDirectory)
|
||||
vstsFeed: WindowsApps
|
||||
vstsFeedPackage: calculator-internals
|
||||
vstsPackageVersion: 0.0.7
|
||||
|
||||
- task: PkgESStoreBrokerPackage@10
|
||||
displayName: Create StoreBroker Packages
|
||||
env:
|
||||
XES_SERIALPOSTBUILDREADY: True
|
||||
inputs:
|
||||
addToFlight: false
|
||||
configPath: tools/Build/StoreBroker/SBCalculatorConfig.json
|
||||
PDPRootPath: $(Build.SourcesDirectory)\PDP
|
||||
imagesRootPath: $(Build.SourcesDirectory)\PDPMediaRoot
|
||||
appxPath: $(Build.ArtifactStagingDirectory)\appxBundleSigned\Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
||||
useArtifactServiceForMedia: true
|
||||
outPath: $(Build.ArtifactStagingDirectory)\StoreBrokerPayload
|
||||
paToken: $(System.AccessToken)
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish StoreBrokerPayload artifact
|
||||
inputs:
|
||||
artifactName: storeBrokerPayload
|
||||
pathToPublish: $(Build.ArtifactStagingDirectory)/StoreBrokerPayload
|
||||
|
||||
- task: PkgESLateTasks@10
|
||||
displayName: Run PackageES LateTasks
|
||||
env:
|
||||
XES_DISABLEPROV: true
|
54
build/pipelines/templates/run-unit-tests.yaml
Normal file
54
build/pipelines/templates/run-unit-tests.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
# This template contains jobs to run unit tests on the interactive test agents.
|
||||
|
||||
parameters:
|
||||
platform: ''
|
||||
|
||||
jobs:
|
||||
- job: UnitTests${{ parameters.platform }}
|
||||
displayName: UnitTests ${{ parameters.platform }}
|
||||
dependsOn: Build${{ parameters.platform }}
|
||||
pool:
|
||||
name: Essential Experiences Interactive
|
||||
workspace:
|
||||
clean: outputs
|
||||
steps:
|
||||
- checkout: none
|
||||
|
||||
- powershell: Write-Host "##vso[task.setvariable variable=agentInstanceId;isOutput=true]$($env:AgentName -replace '\D+' -as [int])"
|
||||
name: LogAgentStep
|
||||
displayName: Log this agent's instance for later cleanup
|
||||
env:
|
||||
AgentName: $(Agent.Name)
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download CalculatorUnitTests
|
||||
inputs:
|
||||
artifactName: drop
|
||||
itemPattern: drop/Release/${{ parameters.platform }}/CalculatorUnitTests_VS/AppPackages/CalculatorUnitTests_Test/**
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Install Certificate
|
||||
inputs:
|
||||
filePath: $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests_VS\AppPackages\CalculatorUnitTests_Test\Add-AppDevPackage.ps1
|
||||
arguments: -CertificatePath $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests_VS\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.cer -Force
|
||||
|
||||
- task: VSTest@2
|
||||
displayName: Run CalculatorUnitTests
|
||||
inputs:
|
||||
testAssemblyVer2: $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests_VS\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.appx
|
||||
otherConsoleOptions: /Platform:${{ parameters.platform }}
|
||||
|
||||
- job: CleanUpUnitTests${{ parameters.platform }}
|
||||
dependsOn: UnitTests${{ parameters.platform }}
|
||||
condition: and(always(), ne(dependencies.UnitTests${{ parameters.platform }}.Outputs['LogAgentStep.agentInstanceId'], ''))
|
||||
pool: server
|
||||
variables:
|
||||
agentInstanceId: $[ dependencies.UnitTests${{ parameters.platform }}.outputs['LogAgentStep.agentInstanceId'] ]
|
||||
steps:
|
||||
- task: InvokeRESTAPI@1
|
||||
displayName: Reimage test machine
|
||||
inputs:
|
||||
connectionType: connectedServiceNameARM
|
||||
azureServiceConnection: macool-sandbox-interactiveDesktopRS5
|
||||
urlSuffix: subscriptions/012a8008-c00f-45b3-9828-41ebba30141d/resourceGroups/interactiveDesktopRS5/providers/Microsoft.Compute/virtualMachineScaleSets/essential/reimage?api-version=2018-10-01
|
||||
body: '{ "instanceIds": ["$(agentInstanceId)"] }'
|
Reference in New Issue
Block a user