Skip to content

Commit 204225b

Browse files
authored
[ci] Fix builds from forks (#8479)
The Xamarin.Android-PR pipeline has been updated to restrict builds from forks, which surfaced a few issues that were missed in commit b1bb67b. The Linux build and the repo used to preserve multi-repo checkout behavior have been updated to fix these issues.
1 parent 9fa4d29 commit 204225b

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

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

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,24 @@ stages:
4040
path: ${{ parameters.checkoutPath }}
4141
persistCredentials: ${{ parameters.checkoutPersistCredentials }}
4242

43-
- checkout: monodroid
44-
clean: true
45-
submodules: recursive
46-
path: s/xamarin-android/external/monodroid
47-
persistCredentials: true
43+
# Always checkout a second resource to ensure we are using multi-repo checkout behavior
44+
# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path
45+
- checkout: maui
4846

49-
- script: rm -rf external/monodroid/external/xamarin-android
50-
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
51-
displayName: delete external xamarin-android submodule
47+
- ${{ if ne(variables['System.PullRequest.IsFork'], 'True') }}:
48+
- checkout: monodroid
49+
clean: true
50+
submodules: recursive
51+
path: s/xamarin-android/external/monodroid
52+
persistCredentials: true
53+
54+
- script: rm -rf external/monodroid/external/xamarin-android
55+
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
56+
displayName: delete external xamarin-android submodule
57+
58+
- script: make prepare-external-git-dependencies PREPARE_CI=1 CONFIGURATION=$(XA.Build.Configuration)
59+
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
60+
displayName: make prepare-external-git-dependencies
5261

5362
- template: setup-ubuntu.yaml
5463

@@ -57,10 +66,6 @@ stages:
5766
inputs:
5867
forceReinstallCredentialProvider: true
5968

60-
- script: make prepare-external-git-dependencies PREPARE_CI=1 CONFIGURATION=$(XA.Build.Configuration)
61-
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
62-
displayName: make prepare-external-git-dependencies
63-
6469
- script: make jenkins PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration)
6570
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
6671
displayName: make jenkins

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ steps:
2424

2525
# Always checkout a second resource to ensure we are using multi-repo checkout behavior
2626
# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path
27-
- checkout: yaml-templates
27+
- checkout: maui
2828

2929
- script: >
3030
ls -l /Applications &&

0 commit comments

Comments
 (0)