Skip to content

Commit

Permalink
Conditionally disable CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcollins committed Feb 11, 2025
1 parent c5a9bc2 commit 10c8c3c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions tools/devops/automation/run-nightly-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ stages:

- task: CodeQL3000Init@0
displayName: CodeQL 3000 Init
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
#condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))

- template: /tools/devops/automation/templates/build/build.yml
parameters:
Expand All @@ -69,6 +69,7 @@ stages:
gitHubToken: $(Github.Token)
xqaCertPass: $(xqa--certificates--password)
use1ES: false
disableCodeQL: false
buildSteps:
- bash: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts/bash/build-nugets.sh
displayName: 'Build Nugets'
Expand All @@ -83,4 +84,4 @@ stages:

- task: CodeQL3000Finalize@0
displayName: CodeQL 3000 Finalize
condition: and(succeededOrFailed(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
#condition: and(succeededOrFailed(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
5 changes: 5 additions & 0 deletions tools/devops/automation/templates/build/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ parameters:
type: boolean
default: true

- name: disableCodeQL
type: boolean
default: true

steps:

- template: ../common/checkout.yml
Expand All @@ -54,6 +58,7 @@ steps:

- template: ../common/setup.yml
parameters:
disableCodeQL: ${{ parameters.disableCodeQL }}
keyringPass: ${{ parameters.keyringPass }}

- template: install-certificates.yml@yaml-templates
Expand Down
5 changes: 4 additions & 1 deletion tools/devops/automation/templates/common/setup.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Template that does all the boiler plate needed to build and execute tests on macOS bots

parameters:

- name: disableCodeQL
type: boolean
default: true
- name: keyringPass
type: string

Expand All @@ -13,6 +15,7 @@ steps:
- bash: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts/disable-codeql-arm64.sh
displayName: 'Disable CodeQL on arm64'
name: disableCodeQLOnArm64
condition: and(succeeded(), eq('${{ parameters.disableCodeQL }}', 'true'))

- bash: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts/bash/fix-github-ssh-key.sh
displayName: 'Fix GitHub SSH host key'
Expand Down

0 comments on commit 10c8c3c

Please # to comment.