Skip to content

Commit

Permalink
[ci] Fix builds from forks (#8479)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pjcollins committed Nov 2, 2023
1 parent 4d9fe5f commit 35cd97d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
29 changes: 17 additions & 12 deletions build-tools/automation/yaml-templates/build-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,24 @@ stages:
path: ${{ parameters.checkoutPath }}
persistCredentials: ${{ parameters.checkoutPersistCredentials }}

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

- script: rm -rf external/monodroid/external/xamarin-android
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
displayName: delete external xamarin-android submodule
- ${{ if ne(variables['System.PullRequest.IsFork'], 'True') }}:
- checkout: monodroid
clean: true
submodules: recursive
path: s/xamarin-android/external/monodroid
persistCredentials: true

- script: rm -rf external/monodroid/external/xamarin-android
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
displayName: delete external xamarin-android submodule

- script: make prepare-external-git-dependencies PREPARE_CI=1 CONFIGURATION=$(XA.Build.Configuration)
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
displayName: make prepare-external-git-dependencies

- template: setup-ubuntu.yaml

Expand All @@ -57,10 +66,6 @@ stages:
inputs:
forceReinstallCredentialProvider: true

- script: make prepare-external-git-dependencies PREPARE_CI=1 CONFIGURATION=$(XA.Build.Configuration)
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
displayName: make prepare-external-git-dependencies

- script: make jenkins PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration)
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
displayName: make jenkins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:

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

- script: >
ls -l /Applications &&
Expand Down

0 comments on commit 35cd97d

Please sign in to comment.