Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[devops] Make the reserve-mac job checkout like the reenable-mac job. #22245

Merged
merged 4 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/devops/automation/scripts/fetch-remote-binlogs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Invoke-SshCommand `
-RemoteHost "$Env:MAC_AGENT_IP" `
-RemoteUserName "$Env:MAC_AGENT_USER" `
-- `
"$Env:MAC_AGENT_BUILD_SOURCESDIRECTORY/tests/dotnet/Windows/collect-binlogs.sh"
"$Env:MAC_AGENT_BUILD_SOURCESDIRECTORY/$Env:BUILD_REPOSITORY_TITLE/tests/dotnet/Windows/collect-binlogs.sh"

New-Item -Path "$Env:BUILD_ARTIFACTSTAGINGDIRECTORY" -Name "windows-binlogs" -ItemType "directory"
New-Item -Path "$Env:BUILD_ARTIFACTSTAGINGDIRECTORY\windows-binlogs" -Name "windows-remote-logs.zip" -ItemType "file" -Value "zip"
Expand Down
36 changes: 19 additions & 17 deletions tools/devops/automation/templates/windows/reserve-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ parameters:
type: string
default: "VSEng-VSMac-Xamarin-Shared"

- name: isPR
type: boolean

- name: repositoryAlias
type: string
default: self
Expand All @@ -23,23 +26,22 @@ parameters:
default: '$(MaciosUploadPrefix)'

steps:
- template: sdk-unified/steps/checkout/v1.yml@yaml-templates

- template: ../common/checkout.yml
parameters:
resource: ${{ parameters.repositoryAlias }}
isPR: ${{ parameters.isPR }}
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
clean: true
path: s/$(BUILD_REPOSITORY_TITLE)
fetchTags: false

- pwsh: '& "$Env:SYSTEM_DEFAULTWORKINGDIRECTORY/tools/devops/automation/scripts/show_bot_info.ps1"'
- pwsh: '& "$Env:SYSTEM_DEFAULTWORKINGDIRECTORY/$Env:BUILD_REPOSITORY_TITLE/tools/devops/automation/scripts/show_bot_info.ps1"'
displayName: 'Show Bot Info'

- bash: $(System.DefaultWorkingDirectory)/tools/devops/automation/scripts/bash/clean-bot.sh
- bash: $(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts/bash/clean-bot.sh
displayName: 'Clean bot'
continueOnError: true
timeoutInMinutes: 60

- bash: $(Build.SourcesDirectory)/tools/devops/automation/scripts/disable-codeql-arm64.sh
- bash: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts/disable-codeql-arm64.sh
displayName: 'Disable CodeQL on arm64'
name: disableCodeQLOnArm64

Expand All @@ -53,13 +55,13 @@ steps:
name: macInfo
displayName: Set agent information

- bash: $(Build.SourcesDirectory)/tools/devops/automation/scripts/clean-for-remote-tests.sh
- bash: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts/clean-for-remote-tests.sh
displayName: 'Clean for remote tests'
continueOnError: true

- template: ../common/install-qa-provisioning-profiles.yml
parameters:
xamarinMaciosPath: $(Build.SourcesDirectory)
xamarinMaciosPath: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)
env:
AUTH_TOKEN_GITHUB_COM: ${{ parameters.gitHubToken }}
AUTH_TOKEN_LA_DEV_APPLE_P12: ${{ parameters.xqaCertPass }}
Expand All @@ -72,7 +74,7 @@ steps:
- template: ./generate-token.yml

- pwsh: |
Import-Module $Env:SYSTEM_DEFAULTWORKINGDIRECTORY\tools\devops\automation\scripts\MaciosCI.psd1
Import-Module $Env:SYSTEM_DEFAULTWORKINGDIRECTORY\$(BUILD_REPOSITORY_TITLE)\tools\devops\automation\scripts\MaciosCI.psd1

New-Item -Path "$($Env:HOME)" -Name "remote_build_testing" -Force -ItemType "directory"
New-Item -Path "$($Env:HOME)/remote_build_testing" -Name "BuildId.txt" -ItemType "file" -Force -Value "$($Env:BUILD_BUILDID)"
Expand All @@ -89,18 +91,18 @@ steps:
$vsts.Agents.SetEnabled($pool, $agent, $False)
displayName: "Disable macOS bot from pool"

- bash: make -C $(Build.SourcesDirectory)/tools/devops provisioning
- bash: make -C $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops provisioning
displayName: 'Generate Xcode provisioning csx file'

- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Xcode'
inputs:
provisioning_script: $(System.DefaultWorkingDirectory)/tools/devops/provision-xcode.csx
provisioning_script: $(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/provision-xcode.csx
provisioning_extra_args: '-vvvv'
github_token: ${{ parameters.gitHubToken }}
timeoutInMinutes: 250

- bash: $(Build.SourcesDirectory)/system-dependencies.sh --ignore-mono --ignore-visual-studio --ignore-mono --ignore-sharpie --ignore-shellcheck --ignore-yamllint --provision-simulators
- bash: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/system-dependencies.sh --ignore-mono --ignore-visual-studio --ignore-mono --ignore-sharpie --ignore-shellcheck --ignore-yamllint --provision-simulators
displayName: 'Provision simulators'
timeoutInMinutes: 250

Expand All @@ -111,7 +113,7 @@ steps:
SecretsFilter: 'RemoteMacIdRsaPub'
displayName: 'Download id_rsa.pub'

- bash: $(Build.SourcesDirectory)/tools/devops/automation/scripts/authorize-id-rsa-pub.sh "$(RemoteMacIdRsaPub)"
- bash: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts/authorize-id-rsa-pub.sh "$(RemoteMacIdRsaPub)"
displayName: "Autorize id_rsa.pub"
continueOnError: true

Expand Down Expand Up @@ -157,13 +159,13 @@ steps:
allowFailedBuilds: true
path: $(Build.SourcesDirectory)/artifacts

- bash: $(Build.SourcesDirectory)/tools/devops/automation/scripts/bash/install-workloads.sh
- bash: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts/bash/install-workloads.sh
workingDirectory: $(System.DefaultWorkingDirectory)
displayName: 'Install .NET + workloads'
timeoutInMinutes: 45
env:
MACIOS_UPLOAD_PREFIX: ${{ parameters.uploadPrefix }}

- bash: $(Build.SourcesDirectory)/tools/devops/automation/scripts/prepare-for-remote-tests.sh
- bash: $(Build.SourcesDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts/prepare-for-remote-tests.sh
displayName: 'Prepare for remote tests'
continueOnError: true
1 change: 1 addition & 0 deletions tools/devops/automation/templates/windows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ stages:
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
isPR: ${{ parameters.isPR }}
macPool: ${{ parameters.macPool }}
gitHubToken: ${{ parameters.gitHubToken }}
xqaCertPass: ${{ parameters.xqaCertPass }}
Expand Down
Loading