Skip to content

Commit 1bead19

Browse files
authored
[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
1 parent 706441c commit 1bead19

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.azdo/codeql.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: $(BuildDefinitionName)-$(date:yyMM).$(date:dd)$(rev:rrr)
2+
3+
trigger: none
4+
5+
schedules:
6+
- cron: "0 10 * * 1-5"
7+
displayName: Daily CodeQL Build
8+
branches:
9+
include:
10+
- latestw_all
11+
12+
stages:
13+
- stage: Build
14+
displayName: Build Win32-OpenSSH
15+
jobs:
16+
- job: BuildPkg
17+
displayName: Build Package
18+
pool:
19+
name: PS-PowerShell-x64
20+
demands:
21+
- ImageOverride -equals PSMMS2019-OpenSSH-Secure
22+
variables:
23+
Codeql.Enabled: true
24+
Codeql.Cadence: 23 # hours
25+
steps:
26+
- task: CodeQL3000Init@0
27+
displayName: Initialize CodeQL
28+
29+
- pwsh: |
30+
Import-Module -Name "$(Build.SourcesDirectory)/contrib/win32/openssh/AzDOBuildTools" -Force
31+
Invoke-AzDOBuild
32+
displayName: Build Win32-OpenSSH
33+
34+
- task: CodeQL3000Finalize@0
35+
displayName: Finalize CodeQL
36+
37+
- pwsh: |
38+
$BuildOutPath = "$(Build.SourcesDirectory)/bin"
39+
$BuildOutx86Path = Join-Path -Path $BuildOutPath -ChildPath 'Win32/Release'
40+
Get-ChildItem -Path $BuildOutx86Path
41+
$BuildOutx64Path = Join-Path -Path $BuildOutPath -ChildPath 'x64/Release'
42+
Get-ChildItem -Path $BuildOutx64Path
43+
displayName: Capture build results

0 commit comments

Comments
 (0)