Skip to content

Commit a8154b4

Browse files
committed
Address Copilot review: fix benchmark branch condition, switch to PublishPipelineArtifact@1; add TSA config, PostBuildCleanup, job retries
1 parent 10814c4 commit a8154b4

3 files changed

Lines changed: 35 additions & 4 deletions

File tree

.Pipelines/template-pipeline-stages.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ stages:
6868
GdnBreakGdnToolCredScan: true
6969
GdnBreakGdnToolPoliCheck: true
7070

71+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3
72+
displayName: 'Publish Security Analysis Logs (TSA)'
73+
condition: succeededOrFailed()
74+
75+
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
76+
displayName: 'Clean agent directories'
77+
condition: always()
78+
7179
# ══════════════════════════════════════════════════════════════════════════════
7280
# Stage 1 · Validate — verify packageVersion matches msal/sku.py __version__
7381
# Skipped when runPublish is false (PR / merge builds).
@@ -123,6 +131,7 @@ stages:
123131
jobs:
124132
- job: Test
125133
displayName: 'Run unit tests'
134+
retries: 3
126135
pool:
127136
vmImage: ubuntu-latest
128137
strategy:

.Pipelines/tsaConfig.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"codebaseName": "MSAL Python",
3+
"notificationAliases": [
4+
"IdentityDevExDotnet@microsoft.com"
5+
],
6+
"codebaseAdmins": [
7+
"EUROPE\\aadidagt"
8+
],
9+
"instanceUrl": "https://identitydivision.visualstudio.com",
10+
"projectName": "IDDP",
11+
"areaPath": "IDDP\\DevEx-Client-SDK\\Python",
12+
"iterationPath": "IDDP\\Unscheduled",
13+
"tools": [
14+
"credscan",
15+
"policheck"
16+
]
17+
}

azure-pipelines.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ stages:
3333
condition: |
3434
and(
3535
succeeded('CI'),
36-
eq(variables['Build.Reason'], 'IndividualCI')
36+
eq(variables['Build.SourceBranch'], 'refs/heads/dev'),
37+
or(
38+
eq(variables['Build.Reason'], 'IndividualCI'),
39+
eq(variables['Build.Reason'], 'BatchedCI'),
40+
eq(variables['Build.Reason'], 'Manual')
41+
)
3742
)
3843
jobs:
3944
- job: Benchmark
@@ -61,9 +66,9 @@ stages:
6166
pytest --benchmark-only --benchmark-json benchmark.json --log-cli-level INFO tests/test_benchmark.py
6267
displayName: 'Run benchmarks'
6368
64-
- task: PublishBuildArtifacts@1
69+
- task: PublishPipelineArtifact@1
6570
displayName: 'Publish benchmark results'
6671
condition: succeededOrFailed()
6772
inputs:
68-
PathtoPublish: 'benchmark.json'
69-
ArtifactName: 'benchmark-results'
73+
targetPath: 'benchmark.json'
74+
artifact: 'benchmark-results'

0 commit comments

Comments
 (0)