@@ -105,6 +105,55 @@ jobs:
105
105
failTaskOnFailedTests : true
106
106
testRunTitle : ' Test Run - $(target)'
107
107
108
+ - job : fetch_pr_labels
109
+ displayName : ' Check for PR Label'
110
+ timeoutInMinutes : 5
111
+ pool :
112
+ vmImage : ' macOS-14'
113
+ steps :
114
+ - script : |
115
+ url="https://api.github.com/repos/$BUILD_REPOSITORY_ID/issues/$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/labels"
116
+
117
+ echo "Fetching labels from $url "
118
+
119
+ # Temporary file to store the raw response
120
+ temp_file=$(mktemp)
121
+
122
+ # Store the response code and the raw response in separate variables
123
+ response_code=$(curl -s -w "%{http_code}" -o "$temp_file" "$url")
124
+ response_content=$(cat "$temp_file")
125
+
126
+ echo "Response code: $response_code"
127
+ echo "Raw response: $response_content"
128
+
129
+ if [[ "$response_code" -eq 200 ]]; then
130
+ label_names=$(echo $response_content | jq -r '.[].name' | paste -sd ', ' -)
131
+ echo "##vso[task.setvariable variable=PR_LABELS;isOutput=true]$label_names"
132
+ [ -z "$label_names" ] && echo "PR labels: <empty>" || echo "PR labels: $label_names"
133
+ else
134
+ echo "Request failed with status code: $response_code - Skipping Native Auth E2E tests as a preventive measure"
135
+ echo "##vso[task.setvariable variable=PR_LABELS;isOutput=true]'skip-native-auth-e2e-tests'"
136
+ fi
137
+
138
+ name: fetchPrLabels
139
+
140
+ - job : e2e_test_native_auth
141
+ displayName : ' Run MSAL E2E tests for native auth'
142
+ dependsOn : fetch_pr_labels
143
+ condition : and( succeeded(), not(contains(dependencies.fetch_pr_labels.outputs['fetchPrLabels.PR_LABELS'], 'skip-native-auth-e2e-tests')) )
144
+ timeoutInMinutes : 30
145
+ cancelTimeoutInMinutes : 5
146
+ pool :
147
+ vmImage : ' macOS-14'
148
+ workspace :
149
+ clean : all
150
+
151
+ steps :
152
+ - template : templates/tests-with-conf-file.yml
153
+ parameters :
154
+ schema : ' MSAL iOS Native Auth E2E Tests'
155
+ build : ' MSAL iOS Native Auth E2E Tests_MSAL iOS Native Auth E2E Tests'
156
+
108
157
- job : ' Validate_SPM_Integration'
109
158
displayName : Validate SPM Integration
110
159
pool :
0 commit comments