Skip to content

Commit acfc1ef

Browse files
authored
[ci] Enable CodeQL on nightly build (#7522)
Context: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/codeql/codeql-semmle CodeQL static analysis has been added to our nightly build job. This tool dramatically increases build times, and for complex builds like xamarin-android it should run in a separate pipeline that is not time sensitive. CodeQL will only run against commits to the main branch.
1 parent 8a20803 commit acfc1ef

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

build-tools/automation/azure-pipelines-nightly.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ stages:
3535
pool:
3636
name: VSEng-Xamarin-RedmondMac-Android-Untrusted
3737
demands: macOS.Name -equals Monterey
38-
timeoutInMinutes: 240
39-
cancelTimeoutInMinutes: 5
38+
timeoutInMinutes: 420
4039
workspace:
4140
clean: all
4241
variables:
4342
- group: Xamarin-Secrets
4443
- group: Xamarin Signing
4544
- group: xamops-azdev-secrets
45+
- name: Codeql.Enabled
46+
value: true
4647
steps:
4748
- checkout: self
4849
submodules: recursive
@@ -67,7 +68,6 @@ stages:
6768
- job: emulator_tests
6869
displayName: macOS > Tests > APKs (Emulator)
6970
timeoutInMinutes: 180
70-
cancelTimeoutInMinutes: 2
7171
strategy:
7272
matrix:
7373
Android21-x86:

build-tools/automation/yaml-templates/commercial-build.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ steps:
4141
workingDirectory: ${{ parameters.xaSourcePath }}
4242
displayName: delete legacy xamarin-android submodule
4343

44+
- task: CodeQL3000Init@0
45+
displayName: CodeQL 3000 Init
46+
condition: and(succeeded(), eq(variables['Codeql.Enabled'], 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
47+
4448
- script: make prepare-external-git-dependencies PREPARE_CI=1 CONFIGURATION=$(XA.Build.Configuration)
4549
workingDirectory: ${{ parameters.xaSourcePath }}
4650
displayName: make prepare-external-git-dependencies
@@ -50,6 +54,10 @@ steps:
5054
workingDirectory: ${{ parameters.xaSourcePath }}
5155
displayName: make jenkins
5256

57+
- task: CodeQL3000Finalize@0
58+
displayName: CodeQL 3000 Finalize
59+
condition: and(succeededOrFailed(), eq(variables['Codeql.Enabled'], 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
60+
5361
# Build test assemblies
5462
- script: make all-tests CONFIGURATION=$(XA.Build.Configuration)
5563
workingDirectory: ${{ parameters.xaSourcePath }}

0 commit comments

Comments
 (0)