From 411bf65d2bf06524e9a807e160ad7a16642c864d Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 27 Nov 2024 15:43:26 +0000 Subject: [PATCH 01/11] See if we can default this on devdiv try again Variables Fix provisioning is it this try this try again try pass variable to all --- eng/pipelines/common/provision.yml | 2 +- eng/pipelines/common/variables.yml | 7 +++++++ eng/pipelines/handlers.yml | 8 ++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/common/provision.yml b/eng/pipelines/common/provision.yml index 5898e926e4f6..9ba34f561ced 100644 --- a/eng/pipelines/common/provision.yml +++ b/eng/pipelines/common/provision.yml @@ -68,7 +68,7 @@ steps: # Provision Additional Software - - ${{ if ne(parameters.skipProvisioning, 'true') }}: + - ${{ if not(parameters.skipProvisioning) }}: - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: - task: xamops.azdevex.provisionator-task.provisionator@2 displayName: 'Provision Additional Software' diff --git a/eng/pipelines/common/variables.yml b/eng/pipelines/common/variables.yml index 901efbd7319d..340a3393c58f 100644 --- a/eng/pipelines/common/variables.yml +++ b/eng/pipelines/common/variables.yml @@ -43,6 +43,11 @@ variables: value: 'eng/provisioning/xcode.csx' - name: provisionator.path value: 'eng/provisioning/provisioning.csx' +- name: internalProvisioning + value: $[or( + eq(variables['provisioning'], 'true'), + eq(variables['System.TeamProject'], 'devdiv') + )] - name: provisionator.extraArguments value: '-vvvv' - name: DotNet.Dir @@ -68,6 +73,8 @@ variables: - ${{ if or(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.DefinitionName'], 'dotnet-maui')) }}: - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - name: internalProvisioning + value: true - name: PrivateBuild value: false - name: _RunAsPublic diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 1ac742ae881b..5e47e1bc2bf2 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -197,7 +197,7 @@ stages: skipAndroidImages: true installDefaultAndroidApi: false skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} - ${{ if parameters.UseProvisionator }}: + ${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}: skipProvisioning: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) ${{ else }}: @@ -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 }}: @@ -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 }}: @@ -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 From d297f374c8e5f9c924628b2cf6428be2a125eefe Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 27 Nov 2024 17:28:51 +0000 Subject: [PATCH 02/11] Try fix provision --- eng/pipelines/common/provision.yml | 37 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/eng/pipelines/common/provision.yml b/eng/pipelines/common/provision.yml index 9ba34f561ced..89b0bb27804a 100644 --- a/eng/pipelines/common/provision.yml +++ b/eng/pipelines/common/provision.yml @@ -68,25 +68,24 @@ steps: # Provision Additional Software - - ${{ if not(parameters.skipProvisioning) }}: - - ${{ 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 ne(parameters.skipProvisioning, 'true') }}: + - 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: | From e277cef08ff8b7b6296ec72310f44ccead363626 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 27 Nov 2024 17:59:05 +0000 Subject: [PATCH 03/11] Try uitests also --- eng/pipelines/common/ui-tests-build-sample.yml | 6 ++++++ eng/pipelines/common/ui-tests-steps.yml | 6 +++--- eng/pipelines/common/variables.yml | 13 ++++--------- eng/pipelines/ui-tests.yml | 7 +++++-- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/eng/pipelines/common/ui-tests-build-sample.yml b/eng/pipelines/common/ui-tests-build-sample.yml index bbb9922503b8..d4d59e3901c3 100644 --- a/eng/pipelines/common/ui-tests-build-sample.yml +++ b/eng/pipelines/common/ui-tests-build-sample.yml @@ -7,6 +7,7 @@ parameters: version: '' #the iOS version' provisionatorChannel: 'latest' agentPoolAccessToken: '' + skipProvisioning: true configuration : "Release" testFilter: '' runtimeVariant: 'Mono' @@ -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') diff --git a/eng/pipelines/common/ui-tests-steps.yml b/eng/pipelines/common/ui-tests-steps.yml index 75bc8cbb3bf3..ca035036a476 100644 --- a/eng/pipelines/common/ui-tests-steps.yml +++ b/eng/pipelines/common/ui-tests-steps.yml @@ -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') diff --git a/eng/pipelines/common/variables.yml b/eng/pipelines/common/variables.yml index 340a3393c58f..d989d502e78a 100644 --- a/eng/pipelines/common/variables.yml +++ b/eng/pipelines/common/variables.yml @@ -44,10 +44,7 @@ variables: - name: provisionator.path value: 'eng/provisioning/provisioning.csx' - name: internalProvisioning - value: $[or( - eq(variables['provisioning'], 'true'), - eq(variables['System.TeamProject'], 'devdiv') - )] + value: false - name: provisionator.extraArguments value: '-vvvv' - name: DotNet.Dir @@ -72,9 +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 + - name: internalProvisioning + value: true + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: - name: PrivateBuild value: false - name: _RunAsPublic @@ -85,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 diff --git a/eng/pipelines/ui-tests.yml b/eng/pipelines/ui-tests.yml index 886c082d4d30..92176f70d28b 100644 --- a/eng/pipelines/ui-tests.yml +++ b/eng/pipelines/ui-tests.yml @@ -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 From 332b97625ed2fa3d2aa0b08a1f8663f43c91eabd Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 27 Nov 2024 18:13:44 +0000 Subject: [PATCH 04/11] try again --- eng/pipelines/common/provision.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/common/provision.yml b/eng/pipelines/common/provision.yml index 89b0bb27804a..e133a8c2f007 100644 --- a/eng/pipelines/common/provision.yml +++ b/eng/pipelines/common/provision.yml @@ -68,7 +68,7 @@ steps: # 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'], 'Darwin')) @@ -97,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')) From 9e2b94c09c286302cc5c38b54a8cd81535471520 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 27 Nov 2024 19:41:39 +0000 Subject: [PATCH 05/11] or this --- eng/pipelines/common/provision.yml | 2 +- eng/pipelines/handlers.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/common/provision.yml b/eng/pipelines/common/provision.yml index e133a8c2f007..1505413c6cc1 100644 --- a/eng/pipelines/common/provision.yml +++ b/eng/pipelines/common/provision.yml @@ -2,7 +2,7 @@ parameters: poolName: '' clearCaches: true skipXcode: false - skipProvisioning: true + skipProvisionator: true skipAndroidSdks: false skipAndroidImages: false installDefaultAndroidApi: false diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 5e47e1bc2bf2..1b0c8eb4e322 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -198,10 +198,10 @@ stages: installDefaultAndroidApi: false skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} ${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}: - skipProvisioning: false + skipProvisionator: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) ${{ else }}: - skipProvisioning: true + skipProvisionator: true - pwsh: ./build.ps1 --target=dotnet --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic displayName: 'Install .NET' retryCountOnTaskFailure: 3 @@ -270,11 +270,11 @@ stages: skipAndroidImages: true installDefaultAndroidApi: true skipXcode: ${{ ne(PackPlatform.name , 'macOS') }} - ${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}: - skipProvisioning: false + ${{ if or(eq(parameters.UseProvisionator, 'True'), eq(variables['internalProvisioning'],'True') )}}: + skipProvisionator: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) ${{ else }}: - skipProvisioning: true + skipProvisionator: true - stage: samples_net displayName: Test .NET MAUI Samples From 1e840aec5459952b79e48154f96dd78ca520d762 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 27 Nov 2024 19:57:06 +0000 Subject: [PATCH 06/11] Not sure why it doesn t work --- eng/pipelines/common/provision.yml | 2 +- eng/pipelines/handlers.yml | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/eng/pipelines/common/provision.yml b/eng/pipelines/common/provision.yml index 1505413c6cc1..9ea0cc19c575 100644 --- a/eng/pipelines/common/provision.yml +++ b/eng/pipelines/common/provision.yml @@ -68,7 +68,7 @@ steps: # Provision Additional Software - - ${{ if not(parameters.skipProvisioning) }}: + - ${{ if not(parameters.skipProvisionator) }}: - task: xamops.azdevex.provisionator-task.provisionator@2 displayName: 'Provision Additional Software' condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 1b0c8eb4e322..775474dfbf34 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -197,11 +197,10 @@ stages: skipAndroidImages: true installDefaultAndroidApi: false skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} - ${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}: + ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'True')) }}: skipProvisionator: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - ${{ else }}: - skipProvisionator: true + - pwsh: ./build.ps1 --target=dotnet --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic displayName: 'Install .NET' retryCountOnTaskFailure: 3 @@ -299,10 +298,10 @@ stages: installDefaultAndroidApi: true skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} ${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}: - skipProvisioning: false + skipProvisionator: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) ${{ else }}: - skipProvisioning: true + skipProvisionator: true - task: DownloadBuildArtifacts@0 displayName: 'Download Packages' inputs: @@ -344,9 +343,9 @@ stages: BuildPlatforms: ${{ parameters.BuildTemplatePlatforms }} MacBuildPool: ${{ parameters.MacTemplatePool }} ${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}: - skipProvisioning: false + skipProvisionator: false ${{ else }}: - skipProvisioning: true + skipProvisionator: true conditionMacTemplates: or( ${{ parameters.BuildEverything }}, ne(variables['Build.Reason'], 'PullRequest'), From 9c9316dc4a0dee07dfb43a1eb47166e803da7df2 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 27 Nov 2024 19:58:45 +0000 Subject: [PATCH 07/11] teste --- eng/pipelines/handlers.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 775474dfbf34..536f989cc79e 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -197,9 +197,11 @@ stages: skipAndroidImages: true installDefaultAndroidApi: false skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} - ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'True')) }}: + ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'True') ) }}: skipProvisionator: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) + ${{ else }}: + skipProvisionator: true - pwsh: ./build.ps1 --target=dotnet --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic displayName: 'Install .NET' From e5502053ae0a7cc755f79adc1f7e44495f8d49d6 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 27 Nov 2024 19:59:39 +0000 Subject: [PATCH 08/11] again --- eng/pipelines/handlers.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 536f989cc79e..8b1ed797d198 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -344,10 +344,6 @@ stages: RunPlatforms: ${{ parameters.RunTemplatePlatforms }} BuildPlatforms: ${{ parameters.BuildTemplatePlatforms }} MacBuildPool: ${{ parameters.MacTemplatePool }} - ${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}: - skipProvisionator: false - ${{ else }}: - skipProvisionator: true conditionMacTemplates: or( ${{ parameters.BuildEverything }}, ne(variables['Build.Reason'], 'PullRequest'), From 8aa9d5dd3194047999eec1dc92c09d47f1fa34cf Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 27 Nov 2024 22:33:29 +0000 Subject: [PATCH 09/11] Again --- eng/pipelines/common/provision.yml | 4 ++-- eng/pipelines/handlers.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/common/provision.yml b/eng/pipelines/common/provision.yml index 9ea0cc19c575..f2d43bf21687 100644 --- a/eng/pipelines/common/provision.yml +++ b/eng/pipelines/common/provision.yml @@ -68,7 +68,7 @@ steps: # Provision Additional Software - - ${{ if not(parameters.skipProvisionator) }}: + - ${{ if ne(parameters.skipProvisionator, true) }}: - task: xamops.azdevex.provisionator-task.provisionator@2 displayName: 'Provision Additional Software' condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) @@ -97,7 +97,7 @@ steps: # Prepare Windows # Provision Additional Software - - ${{ if not(parameters.skipProvisioning) }}: + - ${{ if ne(parameters.skipProvisioning, true) }}: - task: xamops.azdevex.provisionator-task.provisionator@2 displayName: 'Provision Additional Software' condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 8b1ed797d198..9227c322df15 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -197,7 +197,7 @@ stages: skipAndroidImages: true installDefaultAndroidApi: false skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} - ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'True') ) }}: + ${{ if or(eq(parameters.UseProvisionator, true), eq(variables['internalProvisioning'],'True') ) }}: skipProvisionator: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) ${{ else }}: From 975f1114fd3a9500ba1d239e41879c492ae0a410 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Thu, 28 Nov 2024 11:59:25 +0000 Subject: [PATCH 10/11] Fix provisionator on windows --- eng/pipelines/common/provision.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/eng/pipelines/common/provision.yml b/eng/pipelines/common/provision.yml index f2d43bf21687..099e457575cd 100644 --- a/eng/pipelines/common/provision.yml +++ b/eng/pipelines/common/provision.yml @@ -66,9 +66,9 @@ steps: condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) timeoutInMinutes: 30 - # Provision Additional Software - ${{ if ne(parameters.skipProvisionator, true) }}: + # Prepare macOS - task: xamops.azdevex.provisionator-task.provisionator@2 displayName: 'Provision Additional Software' condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) @@ -87,17 +87,7 @@ steps: ${{ if eq(parameters.installDefaultAndroidApi, true) }}: INSTALL_DEFAULT_ANDROID_API: 'true' - # Setup JDK Paths (gradle needs it) - - bash: | - echo "##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_17_X64)" - echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_17_X64)" - # brew install --cask microsoft-openjdk@17 - displayName: 'Setup JDK Paths' - condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) - - # Prepare Windows - # Provision Additional Software - - ${{ if ne(parameters.skipProvisioning, true) }}: + # Prepare Windows - task: xamops.azdevex.provisionator-task.provisionator@2 displayName: 'Provision Additional Software' condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) @@ -114,6 +104,15 @@ steps: ${{ if eq(parameters.installDefaultAndroidApi, true) }}: INSTALL_DEFAULT_ANDROID_API: 'true' + # Prepare Both + # Setup JDK Paths (gradle needs it) + - bash: | + echo "##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_17_X64)" + echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_17_X64)" + # brew install --cask microsoft-openjdk@17 + displayName: 'Setup JDK Paths' + condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) + - pwsh: | if ($env:JAVA_HOME_17_X64) { $env:JAVA_HOME = $env:JAVA_HOME_17_X64 @@ -132,7 +131,6 @@ steps: displayName: 'Setup JDK Paths' condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) - # Prepare Both - task: UseDotNet@2 displayName: 'Use .NET SDK $(DOTNET_VERSION)' inputs: From a8b1f45e45276f3505773312e22583da921ebc58 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Thu, 28 Nov 2024 12:17:35 +0000 Subject: [PATCH 11/11] Try again fix uitest yml --- eng/pipelines/common/device-tests-steps.yml | 4 ++-- eng/pipelines/common/ui-tests-build-sample.yml | 5 ++--- eng/pipelines/common/ui-tests-compatibility-steps.yml | 4 ++-- eng/pipelines/common/ui-tests-steps.yml | 4 ++-- eng/pipelines/handlers.yml | 7 +++++-- eng/pipelines/ui-tests.yml | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/eng/pipelines/common/device-tests-steps.yml b/eng/pipelines/common/device-tests-steps.yml index bce89c46a0ed..b2353ff21a97 100644 --- a/eng/pipelines/common/device-tests-steps.yml +++ b/eng/pipelines/common/device-tests-steps.yml @@ -36,10 +36,10 @@ steps: installDefaultAndroidApi: ${{ or(eq(parameters.platform, 'ios'), eq(parameters.platform, 'catalyst')) }} provisionatorChannel: ${{ parameters.provisionatorChannel }} ${{ if not(parameters.skipProvisioning) }}: - skipProvisioning: false + skipProvisionator : false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) ${{ else }}: - skipProvisioning: true + skipProvisionator: true - pwsh: ./build.ps1 --target=dotnet --configuration="Release" --verbosity=diagnostic displayName: 'Install .NET' diff --git a/eng/pipelines/common/ui-tests-build-sample.yml b/eng/pipelines/common/ui-tests-build-sample.yml index d4d59e3901c3..33b02df6aaf3 100644 --- a/eng/pipelines/common/ui-tests-build-sample.yml +++ b/eng/pipelines/common/ui-tests-build-sample.yml @@ -23,15 +23,14 @@ steps: - template: provision.yml parameters: - skipProvisioning: true # FIXME: 'Build the MSBuild Tasks' step fails for net9.0-android35 without API 35 skipAndroidSdks: false skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }} provisionatorChannel: ${{ parameters.provisionatorChannel }} ${{ if parameters.skipProvisioning }}: - skipProvisioning: true + skipProvisionator: true ${{ else }}: - skipProvisioning: false + skipProvisionator: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - task: PowerShell@2 diff --git a/eng/pipelines/common/ui-tests-compatibility-steps.yml b/eng/pipelines/common/ui-tests-compatibility-steps.yml index 6f3db291af75..a9d1d8ffcec6 100644 --- a/eng/pipelines/common/ui-tests-compatibility-steps.yml +++ b/eng/pipelines/common/ui-tests-compatibility-steps.yml @@ -26,10 +26,10 @@ steps: parameters: ${{ if eq(parameters.platform, 'windows') }}: platform: windows - skipProvisioning: true + skipProvisionator: true ${{ if ne(parameters.platform, 'windows') }}: platform: macos - skipProvisioning: false + skipProvisionator: false skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }} provisionatorChannel: ${{ parameters.provisionatorChannel }} diff --git a/eng/pipelines/common/ui-tests-steps.yml b/eng/pipelines/common/ui-tests-steps.yml index ca035036a476..66caed80239f 100644 --- a/eng/pipelines/common/ui-tests-steps.yml +++ b/eng/pipelines/common/ui-tests-steps.yml @@ -43,9 +43,9 @@ steps: skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }} provisionatorChannel: ${{ parameters.provisionatorChannel }} ${{ if parameters.skipProvisioning }}: - skipProvisioning: true + skipProvisionator: true ${{ else }}: - skipProvisioning: false + skipProvisionator: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - task: PowerShell@2 diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 9227c322df15..1a3645d50d86 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -299,7 +299,7 @@ stages: skipAndroidImages: true installDefaultAndroidApi: true skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} - ${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}: + ${{ if or(eq(parameters.UseProvisionator, true), eq(variables['internalProvisioning'],'True') ) }}: skipProvisionator: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) ${{ else }}: @@ -348,6 +348,9 @@ stages: ${{ parameters.BuildEverything }}, ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv')) - + ${{ if or(eq(parameters.UseProvisionator, true), eq(variables['internalProvisioning'],'True') ) }}: + skipProvisioning: false + + - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: - template: common/localization-handoff.yml # Process outgoing strings [Localization Handoff] diff --git a/eng/pipelines/ui-tests.yml b/eng/pipelines/ui-tests.yml index 92176f70d28b..2401c51c8427 100644 --- a/eng/pipelines/ui-tests.yml +++ b/eng/pipelines/ui-tests.yml @@ -150,7 +150,7 @@ stages: provisionatorChannel: ${{ parameters.provisionatorChannel }} ${{ if parameters.CompatibilityTests }}: runCompatibilityTests: true - ${{ if or(parameters.UseProvisionator, variables['internalProvisioning']) }}: + ${{ if or(eq(parameters.UseProvisionator, true), eq(variables['internalProvisioning'],'True') ) }}: skipProvisioning: false gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) ${{ else }}: