From 2843303b25cce7b01f938e4135564eda2c480403 Mon Sep 17 00:00:00 2001 From: Deep Choudhery <54324771+deepchoudhery@users.noreply.github.com> Date: Wed, 16 Nov 2022 13:02:17 -0800 Subject: [PATCH] removed codeql from pipeline, new one for codeql (#2107) --- azure-pipelines-codeql.yml | 64 ++++++++++++++++++++++++++++++++++++++ azure-pipelines.yml | 4 +-- 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 azure-pipelines-codeql.yml diff --git a/azure-pipelines-codeql.yml b/azure-pipelines-codeql.yml new file mode 100644 index 000000000..005c7c136 --- /dev/null +++ b/azure-pipelines-codeql.yml @@ -0,0 +1,64 @@ +parameters: + # Optionally do not publish to TSA. Useful for e.g. verifying fixes before PR. +- name: TSAEnabled + displayName: Publish results to TSA + type: boolean + default: true + +variables: +- template: eng/common-variables.yml +- template: eng/common/templates/variables/pool-providers.yml + # CG is handled in the primary CI pipeline +- name: skipComponentGovernanceDetection + value: true + # Force CodeQL enabled so it may be run on any branch +- name: Codeql.Enabled + value: true + # Do not let CodeQL 3000 Extension gate scan frequency +- name: Codeql.Cadence + value: 0 + # CodeQL needs this plumbed along as a variable to enable TSA +- name: Codeql.TSAEnabled + value: ${{ parameters.TSAEnabled }} + + # Build variables +- name: _BuildConfig + value: Release + +trigger: none + +schedules: + - cron: 0 12 * * 1 + displayName: Weekly Monday CodeQL run + branches: + include: + - main + - release/6.0 + - release/7.0 + always: true + +jobs: +- job: codeql + displayName: CodeQL + pool: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals 1es-windows-2022 + timeoutInMinutes: 90 + + steps: + + - task: UseDotNet@2 + inputs: + useGlobalJson: true + + - task: CodeQL3000Init@0 + displayName: CodeQL Initialize + + - script: eng\common\cibuild.cmd + -configuration $(_BuildConfig) + -prepareMachine + /p:Test=false + displayName: Windows Build + + - task: CodeQL3000Finalize@0 + displayName: CodeQL Finalize \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6da0f10fc..671327510 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,8 +17,6 @@ variables: value: true - name: _DotNetArtifactsCategory value: .NETCore - - name: Codeql.Enabled - value: true # used for post-build phases, internal builds only - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: @@ -40,7 +38,7 @@ stages: codeSign: true jobs: - job: Windows_NT - timeoutInMinutes: 180 + timeoutInMinutes: 120 pool: # For public or PR jobs, use the hosted pool. For internal jobs use the internal pool. # Will eventually change this to two BYOC pools.