Skip to content

Commit 42aa35a

Browse files
committed
Skip Key Vault and cert steps on forked PRs; e2e tests self-skip when cert is absent
1 parent e8e4d55 commit 42aa35a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.Pipelines/template-pipeline-stages.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,11 @@ stages:
142142
steps:
143143
# Retrieve the MSID Lab certificate from Key Vault (via AuthSdkResourceManager SC).
144144
# Matches the pattern used by MSAL.js (install-keyvault-secrets.yml) and MSAL Java.
145+
# Skipped on forked PRs — service connections are not available to forks.
146+
# E2E tests self-skip when LAB_APP_CLIENT_CERT_PFX_PATH is unset.
145147
- task: AzureKeyVault@2
146148
displayName: 'Retrieve lab certificate from Key Vault'
149+
condition: ne(variables['System.PullRequest.IsFork'], 'True')
147150
inputs:
148151
azureSubscription: 'AuthSdkResourceManager'
149152
KeyVaultName: 'msidlabs'
@@ -161,6 +164,7 @@ stages:
161164
echo "##vso[task.setvariable variable=LAB_APP_CLIENT_CERT_PFX_PATH]$CERT_PATH"
162165
echo "Lab cert written to: $CERT_PATH ($(wc -c < "$CERT_PATH") bytes)"
163166
displayName: 'Write lab certificate to disk'
167+
condition: ne(variables['System.PullRequest.IsFork'], 'True')
164168
env:
165169
LAB_AUTH_B64: $(LabAuth)
166170

0 commit comments

Comments
 (0)