Skip to content

Commit fbbdc9f

Browse files
authored
[ci] Fix DetermineApplicableTests build step (#6389)
The test stages that run in a given PR are selected dynamically after checking which files have changed in the PR. This behavior relies on the [output variables][0] Azure Pipelines feature. In order to access the output variable in other stages, the step that sets it must use the `name:` property. Fix output variable setting from the xaprepare yaml template by adding an option `name` parameter. [0]: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#use-output-variables-from-tasks
1 parent 556b043 commit fbbdc9f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

build-tools/automation/azure-pipelines.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ stages:
151151
arguments: --s=DetermineApplicableTests
152152
xaSourcePath: $(System.DefaultWorkingDirectory)/xamarin-android
153153
displayName: determine which test stages to run
154+
name: TestConditions
154155
condition: and(succeeded(), eq(variables['Build.DefinitionName'], 'Xamarin.Android-PR'))
155156

156157
# This stage ensures Windows specific build steps continue to work, and runs unit tests.

build-tools/automation/yaml-templates/run-xaprepare.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
parameters:
22
displayName: run xaprepare
3+
name:
34
configuration: $(XA.Build.Configuration)
45
xaSourcePath: $(System.DefaultWorkingDirectory)
56
framework: net6.0
@@ -9,6 +10,7 @@ parameters:
910
steps:
1011
- task: DotNetCoreCLI@2
1112
displayName: ${{ parameters.displayName }}
13+
name: ${{ parameters.name }}
1214
condition: ${{ parameters.condition }}
1315
inputs:
1416
command: run

0 commit comments

Comments
 (0)