Skip to content

Commit 5cd9a26

Browse files
authored
[ci] Do not use @self annotation for templates (#8783)
The `@self` yaml template annotation only appears to be needed in the pipeline file, and not in nested templates. This should fix potential issues with other repos that use these templates.
1 parent a1c5111 commit 5cd9a26

13 files changed

+53
-53
lines changed

build-tools/automation/yaml-templates/apk-instrumentation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ parameters:
1313
retryCountOnTaskFailure: 1
1414

1515
steps:
16-
- template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml@self
16+
- template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml
1717
parameters:
1818
configuration: ${{ parameters.buildConfiguration }}
1919
xaSourcePath: ${{ parameters.xaSourcePath }}

build-tools/automation/yaml-templates/build-linux.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ stages:
9797
artifactName: ${{ parameters.nugetArtifactName }}
9898
targetPath: $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-linux
9999

100-
- template: /build-tools/automation/yaml-templates/upload-results.yaml@self
100+
- template: /build-tools/automation/yaml-templates/upload-results.yaml
101101
parameters:
102102
xaSourcePath: $(System.DefaultWorkingDirectory)/xamarin-android
103103
artifactName: ${{ parameters.buildResultArtifactName }}
104104
includeBuildResults: true
105105
use1ESTemplate: ${{ parameters.use1ESTemplate }}
106106

107-
- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml@self
107+
- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml

build-tools/automation/yaml-templates/build-macos.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ stages:
6969
path: ${{ parameters.checkoutPath }}
7070
persistCredentials: ${{ parameters.checkoutPersistCredentials }}
7171

72-
- template: /build-tools/automation/yaml-templates/commercial-build.yaml@self
72+
- template: /build-tools/automation/yaml-templates/commercial-build.yaml
7373
parameters:
7474
xaSourcePath: ${{ parameters.xaSourcePath }}
7575
installerArtifactName: ${{ parameters.installerArtifactName }}
@@ -78,7 +78,7 @@ stages:
7878
windowsToolchainPdbArtifactName: ${{ parameters.windowsToolchainPdbArtifactName }}
7979
use1ESTemplate: ${{ parameters.use1ESTemplate }}
8080

81-
- template: /build-tools/automation/yaml-templates/upload-results.yaml@self
81+
- template: /build-tools/automation/yaml-templates/upload-results.yaml
8282
parameters:
8383
xaSourcePath: ${{ parameters.xaSourcePath }}
8484
artifactName: ${{ parameters.buildResultArtifactName }}

build-tools/automation/yaml-templates/build-windows.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ stages:
3535
path: ${{ parameters.checkoutPath }}
3636
persistCredentials: ${{ parameters.checkoutPersistCredentials }}
3737

38-
- template: /build-tools/automation/yaml-templates/kill-processes.yaml@self
38+
- template: /build-tools/automation/yaml-templates/kill-processes.yaml
3939

40-
- template: /build-tools/automation/yaml-templates/clean.yaml@self
40+
- template: /build-tools/automation/yaml-templates/clean.yaml
4141

4242
- script: |
4343
echo ##vso[task.setvariable variable=JI_JAVA_HOME]%JAVA_HOME_17_X64%
4444
displayName: set JI_JAVA_HOME to $(JAVA_HOME_17_X64)
4545
46-
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml@self
46+
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
4747
parameters:
4848
remove_dotnet: true
4949

@@ -54,7 +54,7 @@ stages:
5454
arguments: '-c $(XA.Build.Configuration) -t:Prepare --no-restore -p:AutoProvision=true -bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\dotnet-build-prepare.binlog'
5555

5656
# Build, pack .nupkgs, and extract workload packs to dotnet preview test directory
57-
- template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml@self
57+
- template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml
5858
parameters:
5959
project: Xamarin.Android.sln
6060
arguments: >-
@@ -63,12 +63,12 @@ stages:
6363
displayName: Build Solution
6464
continueOnError: false
6565

66-
- template: /build-tools/automation/yaml-templates/install-dotnet-tool.yaml@self
66+
- template: /build-tools/automation/yaml-templates/install-dotnet-tool.yaml
6767
parameters:
6868
toolName: apkdiff
6969
version: $(ApkDiffToolVersion)
7070

71-
- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
71+
- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml
7272
parameters:
7373
testRunTitle: Smoke MSBuild Tests - Windows Dotnet Build
7474
testAssembly: $(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\$(DotNetStableTargetFramework)\Xamarin.Android.Build.Tests.dll
@@ -80,9 +80,9 @@ stages:
8080
filename: dotnet-local.cmd
8181
arguments: build samples\HelloWorld\HelloWorld\HelloWorld.DotNet.csproj
8282

83-
- template: /build-tools/automation/yaml-templates/upload-results.yaml@self
83+
- template: /build-tools/automation/yaml-templates/upload-results.yaml
8484
parameters:
8585
artifactName: ${{ parameters.buildResultArtifactName }}
8686
includeBuildResults: true
8787

88-
- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml@self
88+
- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml

build-tools/automation/yaml-templates/commercial-build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ steps:
1111
- script: echo "##vso[task.setvariable variable=JI_JAVA_HOME]$HOME/android-toolchain/jdk-17"
1212
displayName: set JI_JAVA_HOME
1313

14-
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml@self
14+
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
1515
parameters:
1616
remove_dotnet: true
1717

@@ -66,7 +66,7 @@ steps:
6666
displayName: CodeQL 3000 Finalize
6767
condition: and(succeededOrFailed(), eq(variables['Codeql.Enabled'], 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
6868

69-
- template: /build-tools/automation/yaml-templates/install-microbuild-tooling.yaml@self
69+
- template: /build-tools/automation/yaml-templates/install-microbuild-tooling.yaml
7070
parameters:
7171
condition: and(succeeded(), eq(variables['MicroBuildSignType'], 'Real'))
7272

@@ -115,7 +115,7 @@ steps:
115115
/p:MicroBuildOverridePluginDirectory=$(Build.StagingDirectory)/MicroBuild/Plugins
116116
/bl:${{ parameters.xaSourcePath }}/bin/Build$(XA.Build.Configuration)/sign-bu-ex.binlog
117117
118-
- template: /build-tools/automation/yaml-templates/remove-microbuild-tooling.yaml@self
118+
- template: /build-tools/automation/yaml-templates/remove-microbuild-tooling.yaml
119119
parameters:
120120
condition: and(succeededOrFailed(), eq(variables['MicroBuildSignType'], 'Real'))
121121

build-tools/automation/yaml-templates/run-emulator-tests.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
echo "##vso[task.setvariable variable=JAVA_HOME]${{ parameters.jdkTestFolder }}"
2727
displayName: set JAVA_HOME to ${{ parameters.jdkTestFolder }}
2828
29-
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml@self
29+
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml
3030
parameters:
3131
xaprepareScenario: EmulatorTestDependencies
3232
jdkTestFolder: ${{ parameters.jdkTestFolder }}
@@ -36,15 +36,15 @@ jobs:
3636
artifactName: $(TestAssembliesArtifactName)
3737
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)
3838

39-
- template: /build-tools/automation/yaml-templates/start-stop-emulator.yaml@self
39+
- template: /build-tools/automation/yaml-templates/start-stop-emulator.yaml
4040
parameters:
4141
emulatorMSBuildArgs: ${{ parameters.emulatorMSBuildArgs }}
4242

4343
- ${{ parameters.testSteps }}
4444

45-
- template: /build-tools/automation/yaml-templates/upload-results.yaml@self
45+
- template: /build-tools/automation/yaml-templates/upload-results.yaml
4646
parameters:
4747
artifactName: Test Results - ${{ parameters.jobName }} With Emulator - macOS
4848
use1ESTemplate: ${{ parameters.use1ESTemplate }}
4949

50-
- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml@self
50+
- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml

build-tools/automation/yaml-templates/run-msbuild-tests.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ jobs:
3030
- ${{ if eq(parameters.testOS, 'Windows') }}:
3131
- script: netsh int ipv4 set global sourceroutingbehavior=drop
3232

33-
- template: /build-tools/automation/yaml-templates/kill-processes.yaml@self
33+
- template: /build-tools/automation/yaml-templates/kill-processes.yaml
3434

35-
- template: /build-tools/automation/yaml-templates/clean.yaml@self
35+
- template: /build-tools/automation/yaml-templates/clean.yaml
3636

37-
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml@self
37+
- template: /build-tools/automation/yaml-templates/setup-test-environment.yaml
3838
parameters:
3939
installTestSlicer: true
4040
installLegacyXamarinAndroid: true
@@ -47,19 +47,19 @@ jobs:
4747
artifactName: $(TestAssembliesArtifactName)
4848
downloadPath: ${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration)
4949

50-
- template: /build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml@self
50+
- template: /build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml
5151
parameters:
5252
testAssembly: ${{ parameters.xaSourcePath }}/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
5353
testFilter: ${{ parameters.testFilter }}
5454
testRunTitle: Xamarin.Android.Build.Tests - ${{ parameters.testOS }}
5555
retryFailedTests: false
5656
xaSourcePath: ${{ parameters.xaSourcePath }}
5757

58-
- template: /build-tools/automation/yaml-templates/upload-results.yaml@self
58+
- template: /build-tools/automation/yaml-templates/upload-results.yaml
5959
parameters:
6060
artifactName: Test Results - MSBuild - ${{ parameters.testOS }}-$(System.JobPositionInPhase)
6161
xaSourcePath: ${{ parameters.xaSourcePath }}
6262

63-
- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml@self
63+
- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml
6464
parameters:
6565
condition: ${{ parameters.shouldFailOnIssue }}

build-tools/automation/yaml-templates/run-nunit-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ steps:
2222
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
2323
retryCountOnTaskFailure: ${{ parameters.retryCountOnTaskFailure }}
2424

25-
- template: /build-tools/automation/yaml-templates/kill-processes.yaml@self
25+
- template: /build-tools/automation/yaml-templates/kill-processes.yaml

build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ steps:
2828
2929
- ${{ if eq(parameters.retryFailedTests, 'false') }}:
3030
# If we aren't using auto-retry logic, then this is just a simple template call
31-
- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
31+
- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml
3232
parameters:
3333
testRunTitle: ${{ parameters.testRunTitle }}-$(System.JobPositionInPhase)
3434
testAssembly: ${{ parameters.testAssembly }}
@@ -70,7 +70,7 @@ steps:
7070
custom: build-server
7171
arguments: shutdown
7272

73-
- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
73+
- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml
7474
parameters:
7575
testRunTitle: ${{ parameters.testRunTitle }}-$(System.JobPositionInPhase) (Auto-Retry)
7676
testAssembly: ${{ parameters.testAssembly }}

build-tools/automation/yaml-templates/setup-test-environment.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ steps:
3535

3636
# Install .NET 6 for legacy tests
3737
- ${{ if eq(parameters.installLegacyDotNet, true) }}:
38-
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml@self
38+
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
3939
parameters:
4040
version: 6.0
4141
quality: GA
4242
remove_dotnet: ${{ parameters.remove_dotnet }}
4343

4444
# Install latest .NET
45-
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml@self
45+
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
4646

4747
- task: DotNetCoreCLI@2
4848
displayName: shut down existing build daemons
@@ -52,23 +52,23 @@ steps:
5252
arguments: shutdown
5353

5454
- ${{ if eq(parameters.updateMono, true) }}:
55-
- template: /build-tools/automation/yaml-templates/run-xaprepare.yaml@self
55+
- template: /build-tools/automation/yaml-templates/run-xaprepare.yaml
5656
parameters:
5757
displayName: run xaprepare-UpdateMono
5858
arguments: --s=UpdateMono --auto-provision=yes --auto-provision-uses-sudo=yes
5959
condition: and(succeeded(), eq(variables['agent.os'], 'Darwin'))
6060
xaSourcePath: ${{ parameters.xaSourcePath }}
6161

6262
- ${{ if eq(parameters.installLegacyXamarinAndroid, true) }}:
63-
- template: /build-tools/automation/yaml-templates/install-dotnet-tool.yaml@self
63+
- template: /build-tools/automation/yaml-templates/install-dotnet-tool.yaml
6464
parameters:
6565
toolName: boots
6666
version: $(BootsToolVersion)
6767
continueOnError: false
6868
- pwsh: $(Agent.ToolsDirectory)/boots --stable Xamarin.Android
6969
displayName: install Xamarin.Android stable
7070

71-
- template: /build-tools/automation/yaml-templates/run-xaprepare.yaml@self
71+
- template: /build-tools/automation/yaml-templates/run-xaprepare.yaml
7272
parameters:
7373
arguments: --s=${{ parameters.xaprepareScenario }} --android-sdk-platforms="${{ parameters.androidSdkPlatforms }}"
7474
xaSourcePath: ${{ parameters.xaSourcePath }}
@@ -98,13 +98,13 @@ steps:
9898
arguments: -t:ExtractWorkloadPacks -c ${{ parameters.configuration }} -v:n -bl:${{ parameters.xaSourcePath }}/bin/Test${{ parameters.configuration }}/extract-workloads.binlog
9999

100100
- ${{ if eq(parameters.installApkDiff, true) }}:
101-
- template: /build-tools/automation/yaml-templates/install-dotnet-tool.yaml@self
101+
- template: /build-tools/automation/yaml-templates/install-dotnet-tool.yaml
102102
parameters:
103103
toolName: apkdiff
104104
version: $(ApkDiffToolVersion)
105105

106106
- ${{ if eq(parameters.installTestSlicer, true) }}:
107-
- template: /build-tools/automation/yaml-templates/install-dotnet-tool.yaml@self
107+
- template: /build-tools/automation/yaml-templates/install-dotnet-tool.yaml
108108
parameters:
109109
toolName: dotnet-test-slicer
110110
version: $(TestSlicerToolVersion)

0 commit comments

Comments
 (0)