[WIP] add codeql task to CI (#640)

* add codeql task to CI

* add var to enable codeQL

* create scheduled pipeline for codeql runs

* set codeql cadence to run daily

* revert ci.yml changes
This commit is contained in:
Tess Gauthier 2022-12-02 17:16:53 -05:00 committed by GitHub
parent 706441cbd0
commit 1bead19d5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

43
.azdo/codeql.yml Normal file
View File

@ -0,0 +1,43 @@
name: $(BuildDefinitionName)-$(date:yyMM).$(date:dd)$(rev:rrr)
trigger: none
schedules:
- cron: "0 10 * * 1-5"
displayName: Daily CodeQL Build
branches:
include:
- latestw_all
stages:
- stage: Build
displayName: Build Win32-OpenSSH
jobs:
- job: BuildPkg
displayName: Build Package
pool:
name: PS-PowerShell-x64
demands:
- ImageOverride -equals PSMMS2019-OpenSSH-Secure
variables:
Codeql.Enabled: true
Codeql.Cadence: 23 # hours
steps:
- task: CodeQL3000Init@0
displayName: Initialize CodeQL
- pwsh: |
Import-Module -Name "$(Build.SourcesDirectory)/contrib/win32/openssh/AzDOBuildTools" -Force
Invoke-AzDOBuild
displayName: Build Win32-OpenSSH
- task: CodeQL3000Finalize@0
displayName: Finalize CodeQL
- pwsh: |
$BuildOutPath = "$(Build.SourcesDirectory)/bin"
$BuildOutx86Path = Join-Path -Path $BuildOutPath -ChildPath 'Win32/Release'
Get-ChildItem -Path $BuildOutx86Path
$BuildOutx64Path = Join-Path -Path $BuildOutPath -ChildPath 'x64/Release'
Get-ChildItem -Path $BuildOutx64Path
displayName: Capture build results