Skip to content

Commit 08943c1

Browse files
author
Sheyla Trudo
committed
fixup! Template
1 parent 89005a7 commit 08943c1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.pipelines/trigger.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,18 @@ variables:
4141
REPO_NAME: $[ resources.repositories['azure-container-networking'].name ]
4242
REPO_TYPE: $[ resources.repositories['azure-container-networking'].type ]
4343
CHANGESET_COMMIT: $[ resources.repositories['self'].version ]
44+
# Local analysis is only enabled on PR branches
45+
Codeql.AnalyzeInPipeline: $[startsWith(variables['Build.SourceBranch'], 'refs/pull/')]
4446

4547
extends:
4648
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
4749
parameters:
48-
pool:
49-
name: "$(BUILD_POOL_NAME_DEFAULT)"
50+
codeql:
51+
# Enables CodeQL on the main branch
52+
compiled:
53+
enabled: true
54+
# Enables CodeQL on PR branches
55+
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/')) }}:
56+
enabledOnNonDefaultBranches: true
5057
stages:
5158
- template: /.pipelines/pipeline.yaml@azure-container-networking

0 commit comments

Comments
 (0)