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

[ci] See if we can provision by default on devdiv #26170

Merged
merged 11 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
39 changes: 19 additions & 20 deletions eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,24 @@ steps:


# Provision Additional Software
- ${{ if ne(parameters.skipProvisioning, 'true') }}:
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Additional Software'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
continueOnError: true
inputs:
provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorPath }}
provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
github_token: ${{ parameters.gitHubToken }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_COMPONENTS_MAC_IOS_CERTIFICATE_P12: ${{ parameters.certPass }}
${{ if eq(parameters.skipAndroidSdks, true) }}:
SKIP_ANDROID_API_SDKS: 'true'
${{ if eq(parameters.skipAndroidImages, true) }}:
SKIP_ANDROID_API_IMAGES: 'true'
${{ if eq(parameters.installDefaultAndroidApi, true) }}:
INSTALL_DEFAULT_ANDROID_API: 'true'
- ${{ if not(parameters.skipProvisioning) }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Additional Software'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
continueOnError: true
inputs:
provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorPath }}
provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
github_token: ${{ parameters.gitHubToken }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_COMPONENTS_MAC_IOS_CERTIFICATE_P12: ${{ parameters.certPass }}
${{ if eq(parameters.skipAndroidSdks, true) }}:
SKIP_ANDROID_API_SDKS: 'true'
${{ if eq(parameters.skipAndroidImages, true) }}:
SKIP_ANDROID_API_IMAGES: 'true'
${{ if eq(parameters.installDefaultAndroidApi, true) }}:
INSTALL_DEFAULT_ANDROID_API: 'true'

# Setup JDK Paths (gradle needs it)
- bash: |
Expand All @@ -98,7 +97,7 @@ steps:

# Prepare Windows
# Provision Additional Software
- ${{ if ne(parameters.skipProvisioning, 'true') }}:
- ${{ if not(parameters.skipProvisioning) }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Additional Software'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
Expand Down
6 changes: 6 additions & 0 deletions eng/pipelines/common/ui-tests-build-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parameters:
version: '' #the iOS version'
provisionatorChannel: 'latest'
agentPoolAccessToken: ''
skipProvisioning: true
configuration : "Release"
testFilter: ''
runtimeVariant: 'Mono'
Expand All @@ -27,6 +28,11 @@ steps:
skipAndroidSdks: false
skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
${{ if parameters.skipProvisioning }}:
skipProvisioning: true
${{ else }}:
skipProvisioning: false
gitHubToken: $(github--pat--vs-mobiletools-engineering-service2)

- task: PowerShell@2
condition: ne('${{ parameters.platform }}' , 'windows')
Expand Down
6 changes: 3 additions & 3 deletions eng/pipelines/common/ui-tests-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ steps:
skipAndroidSdks: ${{ ne(parameters.platform, 'android') }}
skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
${{ if not(parameters.skipProvisioning) }}:
${{ if parameters.skipProvisioning }}:
skipProvisioning: true
${{ else }}:
skipProvisioning: false
gitHubToken: $(github--pat--vs-mobiletools-engineering-service2)
${{ else }}:
skipProvisioning: true

- task: PowerShell@2
condition: ne('${{ parameters.platform }}' , 'windows')
Expand Down
8 changes: 5 additions & 3 deletions eng/pipelines/common/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ variables:
value: 'eng/provisioning/xcode.csx'
- name: provisionator.path
value: 'eng/provisioning/provisioning.csx'
- name: internalProvisioning
value: false
- name: provisionator.extraArguments
value: '-vvvv'
- name: DotNet.Dir
Expand All @@ -67,7 +69,9 @@ variables:
- group: Xamarin-Secrets

- ${{ if or(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.DefinitionName'], 'dotnet-maui')) }}:
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
- name: internalProvisioning
value: true
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
- name: PrivateBuild
value: false
- name: _RunAsPublic
Expand All @@ -78,8 +82,6 @@ variables:
value: real
# - name: PostBuildSign
# value: true
# For eng/common/SetupNugetSources.ps1
# - group: Xamarin-Secrets

- group: DotNetBuilds storage account read tokens
- group: AzureDevOps-Artifact-Feeds-Pats
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/handlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ stages:
skipAndroidImages: true
installDefaultAndroidApi: false
skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }}
${{ if parameters.UseProvisionator }}:
${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattleibow I can t get this to work, the idea is we could use the variable or set as default on devdiv.. do you have any idea what I m missing seems this is never true its always passing skipProvisioning: false

skipProvisioning: false
gitHubToken: $(github--pat--vs-mobiletools-engineering-service2)
${{ else }}:
Expand Down Expand Up @@ -270,7 +270,7 @@ stages:
skipAndroidImages: true
installDefaultAndroidApi: true
skipXcode: ${{ ne(PackPlatform.name , 'macOS') }}
${{ if parameters.UseProvisionator }}:
${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}:
skipProvisioning: false
gitHubToken: $(github--pat--vs-mobiletools-engineering-service2)
${{ else }}:
Expand Down Expand Up @@ -298,7 +298,7 @@ stages:
skipAndroidImages: true
installDefaultAndroidApi: true
skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }}
${{ if parameters.UseProvisionator }}:
${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}:
skipProvisioning: false
gitHubToken: $(github--pat--vs-mobiletools-engineering-service2)
${{ else }}:
Expand Down Expand Up @@ -343,7 +343,7 @@ stages:
RunPlatforms: ${{ parameters.RunTemplatePlatforms }}
BuildPlatforms: ${{ parameters.BuildTemplatePlatforms }}
MacBuildPool: ${{ parameters.MacTemplatePool }}
${{ if parameters.UseProvisionator }}:
${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}:
skipProvisioning: false
${{ else }}:
skipProvisioning: true
Expand Down
7 changes: 5 additions & 2 deletions eng/pipelines/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,17 @@ stages:
androidApiLevels: [ 30 ]
iosVersions: [ '18.0' ]
provisionatorChannel: ${{ parameters.provisionatorChannel }}
skipProvisioning: ${{ or(not(parameters.UseProvisionator), false) }}
${{ else }}:
androidApiLevels: [ 30 ]
iosVersions: [ '18.0' ]
provisionatorChannel: ${{ parameters.provisionatorChannel }}
skipProvisioning: ${{ not(parameters.UseProvisionator) }}
${{ if parameters.CompatibilityTests }}:
runCompatibilityTests: true
${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}:
skipProvisioning: false
gitHubToken: $(github--pat--vs-mobiletools-engineering-service2)
${{ else }}:
skipProvisioning: true
projects:
- name: controls
desc: Controls
Expand Down
Loading