From ae197872de6a16dbb7ba30f5657d3fe36135f8a5 Mon Sep 17 00:00:00 2001 From: Alex Villarreal <716334+alexvy86@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:21:50 -0500 Subject: [PATCH] refactor: Disable CodeQL in test pipelines (#22802) ## Description Disables the auto-injection of CodeQL tasks in our test pipelines. The CodeQL tasks always "fail" (the ADO step still succeeds but the task can't find source code so it can't run CodeQL and logs warnings) in the test pipelines for which we don't checkout the repo, which is the case for our test pipelines. [Example](https://dev.azure.com/fluidframework/internal/_build/results?buildId=300062&view=logs&j=26483432-40f5-552c-5792-70aed8cde738&t=fb288d9b-a668-57e8-da86-3cec1930f710&l=55) (msft internal). The task itself says that it should only run for build pipelines (where source code exists). --- tools/pipelines/test-dds-stress.yml | 3 +++ tools/pipelines/test-perf-benchmarks.yml | 3 +++ tools/pipelines/test-real-service-stress.yml | 3 +++ tools/pipelines/test-real-service.yml | 3 +++ tools/pipelines/test-service-clients.yml | 3 +++ tools/pipelines/test-stability.yml | 3 +++ 6 files changed, 18 insertions(+) diff --git a/tools/pipelines/test-dds-stress.yml b/tools/pipelines/test-dds-stress.yml index 01ee62c2cb3..6e4dcb5221f 100644 --- a/tools/pipelines/test-dds-stress.yml +++ b/tools/pipelines/test-dds-stress.yml @@ -25,6 +25,9 @@ variables: - name: absolutePathToTelemetryGenerator value: $(Build.SourcesDirectory)/tools/telemetry-generator readonly: true +# This is a test pipeline, not a build one, so we don't need to run CodeQL tasks +- name: DisableCodeQL + value: true parameters: - name: packages diff --git a/tools/pipelines/test-perf-benchmarks.yml b/tools/pipelines/test-perf-benchmarks.yml index 721c597a939..7a1fd6f1645 100644 --- a/tools/pipelines/test-perf-benchmarks.yml +++ b/tools/pipelines/test-perf-benchmarks.yml @@ -84,6 +84,9 @@ variables: - name: pipelineIdentifierForTelemetry value: 'PerformanceBenchmark' readonly: true + # This is a test pipeline, not a build one, so we don't need to run CodeQL tasks + - name: DisableCodeQL + value: true lockBehavior: sequential stages: diff --git a/tools/pipelines/test-real-service-stress.yml b/tools/pipelines/test-real-service-stress.yml index 6772d932d89..8c64583d886 100644 --- a/tools/pipelines/test-real-service-stress.yml +++ b/tools/pipelines/test-real-service-stress.yml @@ -33,6 +33,9 @@ variables: - name: pipelineIdentifierForTelemetry value: 'RealStressService' readonly: true +# This is a test pipeline, not a build one, so we don't need to run CodeQL tasks +- name: DisableCodeQL + value: true lockBehavior: sequential stages: diff --git a/tools/pipelines/test-real-service.yml b/tools/pipelines/test-real-service.yml index 9ae64408012..69f832c390f 100644 --- a/tools/pipelines/test-real-service.yml +++ b/tools/pipelines/test-real-service.yml @@ -33,6 +33,9 @@ variables: - name: pipelineIdentifierForTelemetry value: 'EndToEndTests' readonly: true +# This is a test pipeline, not a build one, so we don't need to run CodeQL tasks +- name: DisableCodeQL + value: true lockBehavior: sequential stages: diff --git a/tools/pipelines/test-service-clients.yml b/tools/pipelines/test-service-clients.yml index 5294781324d..00df17ef8f9 100644 --- a/tools/pipelines/test-service-clients.yml +++ b/tools/pipelines/test-service-clients.yml @@ -33,6 +33,9 @@ variables: - name: pipelineIdentifierForTelemetry value: 'ServiceClientsEndToEndTests' readonly: true +# This is a test pipeline, not a build one, so we don't need to run CodeQL tasks +- name: DisableCodeQL + value: true stages: # Run Azure Client FRS Tests diff --git a/tools/pipelines/test-stability.yml b/tools/pipelines/test-stability.yml index 1ccf14663a2..5582a96bfdc 100644 --- a/tools/pipelines/test-stability.yml +++ b/tools/pipelines/test-stability.yml @@ -142,6 +142,9 @@ variables: value: 1 - name: pnpmStorePath value: $(Pipeline.Workspace)/.pnpm-store +# This is a test pipeline, not a build one, so we don't need to run CodeQL tasks +- name: DisableCodeQL + value: true stages: - ${{ each stageName in parameters.stageNames }}: