Compare commits

...

26 commits

Author SHA1 Message Date
Michael Niksa f1871455ee throw more things at the wall 2021-08-10 13:02:09 -07:00
Michael Niksa 544dade1c2 separate extract into two steps I guess 2021-08-10 11:31:22 -07:00
Michael Niksa a7aeb1cee3 update match patterns 2021-08-10 10:49:59 -07:00
Michael Niksa f2b6d98b25 add pkges setup task to compliance pipe 2021-08-10 09:29:40 -07:00
Michael Niksa 0c3585750e vmimage 2021-08-05 14:56:28 -07:00
Michael Niksa c4bf1a59cf messin' about 2021-08-05 14:55:25 -07:00
Michael Niksa 91a6245639 more unzip fun 2021-08-05 14:49:12 -07:00
Michael Niksa 2d113f5dd5 try to show output 2021-08-05 14:48:40 -07:00
Michael Niksa 19cdf31988 try to show output 2021-08-05 14:44:17 -07:00
Michael Niksa a473cf2898 try to show output 2021-08-05 14:42:43 -07:00
Michael Niksa 7c47d4b5f8 make testing this slightly easier temporarily 2021-08-05 14:38:50 -07:00
Michael Niksa 0b5e9a4438 try a different place for archives? 2021-08-05 14:37:12 -07:00
Michael Niksa 2cc77772b2 wrong destination folder for copy pasta 2021-08-05 14:32:33 -07:00
Michael Niksa e2be021601 apparently pkgesseccomp not updated to 12 for 1es 2021-08-05 14:29:47 -07:00
Michael Niksa 8dbe3009c2 wrong indent because yaml 2021-08-05 14:28:41 -07:00
Michael Niksa 8b14ec582a add checkout bit and nerf dependency 2021-08-05 14:28:02 -07:00
Michael Niksa 06910d5aa7 attempt to break out compliance tasks onto 2019 image and temporarily use recycled artifacts to speed this up 2021-08-05 14:20:24 -07:00
Michael Niksa e7cbeac551 use correct method name 2021-08-05 09:41:06 -07:00
Michael Niksa 702780d1b9 conditionally append access token 2021-08-04 16:27:10 -07:00
Michael Niksa cdc0e240f6 re-sprinkle helix access tokens 2021-08-04 16:18:15 -07:00
Michael Niksa 5378091939 closed and open helix queues 2021-08-04 16:04:49 -07:00
Michael Niksa 1bd54fa13d undo temporary testing stuff 2021-08-04 15:40:05 -07:00
Michael Niksa 56009cd99d goof less 2021-08-04 15:22:50 -07:00
Michael Niksa 801f0668d4 bippity boppity boo 2021-08-04 15:21:51 -07:00
Michael Niksa d7dddf4cdd attempt machine version test and change to artifact feed connection 2021-08-04 12:36:57 -07:00
Michael Niksa 940560ab9e Add compliance task to pipeline 2021-08-04 10:34:46 -07:00
5 changed files with 152 additions and 14 deletions

View file

@ -20,13 +20,31 @@ function Generate-File-Links
Out-File -FilePath $helixLinkFile -Append -InputObject "<ul>"
foreach($file in $files)
{
Out-File -FilePath $helixLinkFile -Append -InputObject "<li><a href=$($file.Link)>$($file.Name)</a></li>"
$url = Append-HelixAccessTokenToUrl $file.Link "{Your-Helix-Access-Token-Here}"
Out-File -FilePath $helixLinkFile -Append -InputObject "<li>$($url)</li>"
}
Out-File -FilePath $helixLinkFile -Append -InputObject "</ul>"
Out-File -FilePath $helixLinkFile -Append -InputObject "</div>"
}
}
function Append-HelixAccessTokenToUrl
{
Param ([string]$url, [string]$token)
if($token)
{
if($url.Contains("?"))
{
$url = "$($url)&access_token=$($token)"
}
else
{
$url = "$($url)?access_token=$($token)"
}
}
return $url
}
#Create output directory
New-Item $OutputFolder -ItemType Directory
@ -63,7 +81,8 @@ foreach ($testRun in $testRuns.value)
if (-not $workItems.Contains($workItem))
{
$workItems.Add($workItem)
$filesQueryUri = "https://helix.dot.net/api/2019-06-17/jobs/$helixJobId/workitems/$helixWorkItemName/files$accessTokenParam"
$filesQueryUri = "https://helix.dot.net/api/2019-06-17/jobs/$helixJobId/workitems/$helixWorkItemName/files"
$filesQueryUri = Append-HelixAccessTokenToUrl $filesQueryUri $helixAccessToken
$files = Invoke-RestMethodWithRetries $filesQueryUri
$screenShots = $files | where { $_.Name.EndsWith(".jpg") }
@ -102,6 +121,7 @@ foreach ($testRun in $testRuns.value)
Write-Host "Downloading $link to $destination"
$link = Append-HelixAccessTokenToUrl $link $HelixAccessToken
Download-FileWithRetries $link $destination
}
}

View file

@ -4,7 +4,9 @@ pr: none
pool:
name: WinDevPool-L
demands: ImageOverride -equals WinDevVS16-latest
demands:
- ImageOverride -equals WinDevVS16-latest
- ImageVersionOverride -equals 2.0.0
parameters:
- name: branding
@ -17,7 +19,7 @@ parameters:
- name: buildTerminal
displayName: "Build Windows Terminal MSIX"
type: boolean
default: true
default: false
- name: buildTerminalVPack
displayName: "Build Windows Terminal VPack"
type: boolean
@ -29,7 +31,7 @@ parameters:
- name: pgoBuildMode
displayName: "PGO Build Mode"
type: string
default: Optimize
default: None
values:
- Optimize
- Instrument
@ -43,8 +45,8 @@ parameters:
type: object
default:
- x64
- x86
- arm64
# - x86
# - arm64
variables:
TerminalInternalPackageVersion: "0.0.7"
@ -66,6 +68,7 @@ jobs:
BuildPlatform: ${{ platform }}
displayName: Build
cancelTimeoutInMinutes: 1
condition: false
steps:
- checkout: self
clean: true
@ -265,6 +268,95 @@ jobs:
IndexSources: false
SymbolServerType: TeamServices
- job: ComplianceTasks
displayName: Validate security and compliance
pool:
vmImage: 'windows-2019'
#dependsOn: Build
steps:
- checkout: self
fetchDepth: 1
clean: true
submodules: true
persistCredentials: True
- task: PkgESSetupBuild@12
displayName: 'Package ES - Setup Build'
- task: NuGetAuthenticate@0
# 1ES Component Governance onboarding (Detects open source components). See https://docs.opensource.microsoft.com/tools/cg.html
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: Component Detection
# PREfast. See https://www.1eswiki.com/wiki/SDL_Native_Rules_Build_Task
- task: securedevelopmentteam.vss-secure-development-tools.build-task-prefast.SDLNativeRules@2
displayName: 'Run the PREfast SDL Native Rules for MSBuild'
condition: succeededOrFailed()
# Copies output from PREfast SDL Native Rules task to expected location for consumption by PkgESSecComp
- task: CopyFiles@1
displayName: 'Copy PREfast xml files to SDLNativeRulesDir'
inputs:
SourceFolder: '$(Agent.BuildDirectory)'
Contents: |
**\*.nativecodeanalysis.xml
TargetFolder: '$(Agent.BuildDirectory)\_sdt\logs\SDLNativeRules'
- task: DownloadBuildArtifacts@0
displayName: Download Build Artifacts
inputs:
artifactName: appx-x64-Release
downloadPath: $(System.ArtifactsDirectory)
buildType: 'specific'
project: $(System.TeamProjectId)
pipeline: 70913
buildVersionToDownload: 'specific'
buildId: 37520569
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(System.ArtifactsDirectory)\**\CascadiaPackage*.msix'
cleanDestinationFolder: true
overwriteExistingFiles: true
destinationFolder: $(Build.BinariesDirectory)
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(System.ArtifactsDirectory)\**\CascadiaPackage*.appxsym'
cleanDestinationFolder: false
overwriteExistingFiles: true
destinationFolder: $(Build.BinariesDirectory)
# Set XES_SERIALPOSTBUILDREADY to run Security and Compliance task once per build
- powershell: Write-Host “##vso[task.setvariable variable=XES_SERIALPOSTBUILDREADY;]true”
displayName: 'Set XES_SERIALPOSTBUILDREADY Vars'
- task: PkgESSecComp@10
displayName: 'Security and Compliance tasks'
inputs:
fileNewBugs: false
areaPath: 'OS\WDX\DXP\WinDev\Terminal'
teamProject: 'OS'
iterationPath: 'OS\Future'
bugTags: 'TerminalReleaseCompliance'
scanAll: true
errOnBugs: false
failOnStdErr: true
taskLogVerbosity: Diagnostic
secCompConfigFromTask: |
# Overrides default build sources directory
sourceTargetOverrideAll: $(Build.SourcesDirectory)
# Overrides default build binaries directory when "Scan all" option is specified
binariesTargetOverrideAll: $(Build.BinariesDirectory)
# Set the tools to false if they should not run in the build
tools:
- toolName: CheckCFlags
enable: true
- toolName: CFGCheck
enable: true
- toolName: Policheck
enable: false
- toolName: CredScan
enable: false
- toolName: XFGCheck
enable: false
- ${{ if eq(parameters.buildTerminal, true) }}:
- job: BundleAndSign
displayName: Create and sign AppX/MSIX bundles

View file

@ -22,6 +22,7 @@ jobs:
condition: succeededOrFailed()
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
HelixAccessToken: $(HelixApiAccessToken)
inputs:
targetType: filePath
filePath: build\Helix\UpdateUnreliableTests.ps1
@ -32,6 +33,7 @@ jobs:
condition: succeededOrFailed()
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
HelixAccessToken: $(HelixApiAccessToken)
inputs:
targetType: filePath
filePath: build\Helix\OutputTestResults.ps1

View file

@ -15,6 +15,7 @@ parameters:
# if 'useBuildOutputFromBuildId' is set, we will default to using a build from this pipeline:
useBuildOutputFromPipeline: $(System.DefinitionId)
openHelixTargetQueues: 'windows.10.amd64.client19h1.open.xaml'
closedHelixTargetQueues: 'windows.10.amd64.client19h1.xaml'
jobs:
- job: ${{ parameters.name }}
@ -29,11 +30,11 @@ jobs:
buildConfiguration: ${{ parameters.configuration }}
buildPlatform: ${{ parameters.platform }}
openHelixTargetQueues: ${{ parameters.openHelixTargetQueues }}
closedHelixTargetQueues: ${{ parameters.closedHelixTargetQueues }}
artifactsDir: $(Build.SourcesDirectory)\Artifacts
taefPath: $(Build.SourcesDirectory)\build\Helix\packages\Microsoft.Taef.10.60.210621002\build\Binaries\$(buildPlatform)
helixCommonArgs: '/binaryLogger:$(Build.SourcesDirectory)/${{parameters.name}}.$(buildPlatform).$(buildConfiguration).binlog /p:HelixBuild=$(Build.BuildId).$(buildPlatform).$(buildConfiguration) /p:Platform=$(buildPlatform) /p:Configuration=$(buildConfiguration) /p:HelixType=${{parameters.helixType}} /p:TestSuite=${{parameters.testSuite}} /p:ProjFilesPath=$(Build.ArtifactStagingDirectory) /p:rerunPassesRequiredToAvoidFailure=${{parameters.rerunPassesRequiredToAvoidFailure}}'
steps:
- task: CmdLine@1
displayName: 'Display build machine environment variables'
@ -140,6 +141,7 @@ jobs:
- task: DotNetCoreCLI@2
displayName: 'Run tests in Helix (open queues)'
condition: and(succeeded(),eq(variables['System.CollectionUri'],'https://dev.azure.com/ms/'))
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
@ -147,3 +149,15 @@ jobs:
projects: build\Helix\RunTestsInHelix.proj
custom: msbuild
arguments: '$(helixCommonArgs) /p:IsExternal=true /p:Creator=Terminal /p:HelixTargetQueues=$(openHelixTargetQueues)'
- task: DotNetCoreCLI@2
displayName: 'Run tests in Helix (closed queues)'
condition: and(succeeded(),ne(variables['System.CollectionUri'],'https://dev.azure.com/ms/'))
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
HelixAccessToken: $(HelixApiAccessToken)
inputs:
command: custom
projects: build\Helix\RunTestsInHelix.proj
custom: msbuild
arguments: '$(helixCommonArgs) /p:HelixTargetQueues=$(closedHelixTargetQueues)'

View file

@ -20,11 +20,15 @@ jobs:
inputs:
artifactName: ${{ parameters.pgoArtifact }}
downloadPath: $(artifactsPath)
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 5.2.0'
- task: NuGetAuthenticate@0
inputs:
versionSpec: 5.2.0
nuGetServiceConnections: 'Terminal Public Artifact Feed'
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 5.8.0'
inputs:
versionSpec: 5.8.0
- task: CopyFiles@2
displayName: 'Copy pgd files to NuGet build directory'
@ -58,5 +62,11 @@ jobs:
displayName: 'NuGet push'
inputs:
command: push
publishVstsFeed: Terminal/TerminalDependencies
packagesToPush: $(Build.ArtifactStagingDirectory)/*.nupkg
nuGetFeedType: external
packagesToPush: $(Build.ArtifactStagingDirectory)/*.nupkg
# The actual URL and PAT for this feed is configured at
# https://microsoft.visualstudio.com/Dart/_settings/adminservices
# This is the name of that connection
publishFeedCredentials: 'Terminal Public Artifact Feed'
feedsToUse: config
nugetConfigPath: '$(Build.SourcesDirectory)/NuGet.config'