|
| 1 | +# run MSAL with Broker UI automation testcases |
| 2 | +# Variable: 'ENV_VSTS_MVN_ANDROIDADACCOUNTS_USERNAME' was defined in the Variables tab |
| 3 | +# Variable: 'gCloudProjectId' was defined in the Variables tab |
| 4 | +# Variable: 'mvnAccessToken' was defined in the Variables tab |
| 5 | +name: $(Build.BuildId)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) |
| 6 | + |
| 7 | +trigger: none |
| 8 | +pr: none |
| 9 | + |
| 10 | +schedules: |
| 11 | + - cron: "0 5 * * 1-6" # 5:00 AM UTC everyday Mon-Sat |
| 12 | + displayName: Daily Local MSAL UI Automation with Prod Broker Run |
| 13 | + branches: |
| 14 | + include: |
| 15 | + - dev |
| 16 | + always: true |
| 17 | + |
| 18 | +parameters: |
| 19 | + - name: firebaseDeviceId |
| 20 | + type: string |
| 21 | + displayName: Firebase Device Id |
| 22 | + default: blueline |
| 23 | + values: |
| 24 | + - blueline |
| 25 | + - flame |
| 26 | + - redfin |
| 27 | + - sailfish |
| 28 | + - walleye |
| 29 | + - bluejay |
| 30 | + - oriole |
| 31 | + - name: firebaseDeviceAndroidVersion |
| 32 | + displayName: Firebase Device Android Version |
| 33 | + type: number |
| 34 | + default: 28 |
| 35 | + values: |
| 36 | + - 25 |
| 37 | + - 26 |
| 38 | + - 27 |
| 39 | + - 28 |
| 40 | + - 29 |
| 41 | + - 30 |
| 42 | + - 31 |
| 43 | + - 32 |
| 44 | + - 33 |
| 45 | + - name: testTargetPackages |
| 46 | + displayName: Packages as Test Targets |
| 47 | + type: string |
| 48 | + default: package com.microsoft.identity.client.msal.automationapp.testpass.broker |
| 49 | + - name: oldBrokerHostVersion |
| 50 | + displayName: Old Broker host Version |
| 51 | + type: string |
| 52 | + default: '0.0.1' |
| 53 | + |
| 54 | +variables: |
| 55 | + engineeringProjectId: 'fac9d424-53d2-45c0-91b5-ef6ba7a6bf26' |
| 56 | + azureSamplePipelineId: 1458 |
| 57 | + brokerHostPipelineId: 1432 |
| 58 | + msazureServiceConnection: AndroidBroker-CI |
| 59 | + msazureFeedName: Android-Broker |
| 60 | + azureSampleApk: AzureSample-local-debug.apk |
| 61 | + brokerHostApk: brokerHost-local-debug.apk |
| 62 | + oldBrokerHostApk: brokerHost-local-debug.apk |
| 63 | + firebaseTimeout: 45m |
| 64 | + |
| 65 | +stages: |
| 66 | + # msalautomationapp |
| 67 | + - stage: 'msalautomationapp' |
| 68 | + displayName: Build MSAL Automation APKs |
| 69 | + jobs: |
| 70 | + - template: ./templates/build-msal-automation-app.yml |
| 71 | + parameters: |
| 72 | + brokerFlavor: AutoBroker |
| 73 | + msalFlavor: Local |
| 74 | + brokerSource: PlayStore |
| 75 | + # Brokers |
| 76 | + - stage: 'brokers' |
| 77 | + dependsOn: [] # this removes the implicit dependency on previous stage and causes this to run in parallel |
| 78 | + displayName: Brokers and Azure Sample APKs |
| 79 | + jobs: |
| 80 | + - job: 'download_brokers' |
| 81 | + displayName: Download Brokers |
| 82 | + pool: |
| 83 | + vmImage: ubuntu-latest |
| 84 | + steps: |
| 85 | + - checkout: none |
| 86 | + - task: DownloadPipelineArtifact@2 |
| 87 | + displayName: 'Download latest Azure Sample' |
| 88 | + inputs: |
| 89 | + buildType: 'specific' |
| 90 | + project: '$(engineeringProjectId)' |
| 91 | + definition: '$(azureSamplePipelineId)' |
| 92 | + artifactName: AzureSample |
| 93 | + itemPattern: '**/*.apk' |
| 94 | + targetPath: '$(Build.ArtifactStagingDirectory)/azureSample' |
| 95 | + buildVersionToDownload: 'latest' |
| 96 | + - task: DownloadPipelineArtifact@2 |
| 97 | + displayName: 'Download Broker Host' |
| 98 | + inputs: |
| 99 | + buildType: specific |
| 100 | + project: '$(engineeringProjectId)' |
| 101 | + definition: '$(brokerHostPipelineId)' |
| 102 | + artifactName: BrokerHost |
| 103 | + itemPattern: '**/*.apk' |
| 104 | + targetPath: '$(Build.ArtifactStagingDirectory)/brokerHost' |
| 105 | + - task: UniversalPackages@0 |
| 106 | + displayName: 'Download old brokerHost version from feed' |
| 107 | + inputs: |
| 108 | + command: 'download' |
| 109 | + downloadDirectory: '$(Build.ArtifactStagingDirectory)/oldBrokerHost' |
| 110 | + feedsToUse: 'external' |
| 111 | + externalFeedCredentials: '$(msazureServiceConnection)' |
| 112 | + feedDownloadExternal: '$(msazureFeedName)' |
| 113 | + packageDownloadExternal: 'broker-host' |
| 114 | + versionDownloadExternal: '${{ parameters.oldBrokerHostVersion }}' |
| 115 | + |
| 116 | + - publish: $(Build.ArtifactStagingDirectory)/azureSample |
| 117 | + displayName: 'Publish Azure Sample apk for later use' |
| 118 | + artifact: azureSample |
| 119 | + - publish: $(Build.ArtifactStagingDirectory)/brokerHost |
| 120 | + displayName: 'Publish Broker Host apk for later use' |
| 121 | + artifact: brokerHost |
| 122 | + - publish: $(Build.ArtifactStagingDirectory)/oldBrokerHost |
| 123 | + displayName: 'Publish Broker Host old apk for later use' |
| 124 | + artifact: oldBrokerHost |
| 125 | + # MSAL with Broker Test Plan stage |
| 126 | + - stage: 'msal_with_broker' |
| 127 | + dependsOn: |
| 128 | + - msalautomationapp |
| 129 | + - brokers |
| 130 | + displayName: Running MSAL with Broker Test UI Test Suite |
| 131 | + jobs: |
| 132 | + - template: ./templates/flank/run-on-firebase-with-flank.yml |
| 133 | + parameters: |
| 134 | + automationAppApkPath: "$(Pipeline.Workspace)/msalautomationapks/msalautomationapp-local-AutoBroker-debug.apk" |
| 135 | + automationAppTestApkPath: "$(Pipeline.Workspace)/msalautomationapks/msalautomationapp-local-AutoBroker-debug-androidTest.apk" |
| 136 | + testTargetPackages: ${{ parameters.testTargetPackages }} |
| 137 | + resultsHistoryName: "Dev MSAL with Prod Broker (AuthApp, CP)" |
| 138 | + otherFiles: "/data/local/tmp/BrokerHost.apk=$(Pipeline.Workspace)/brokerHost/$(brokerHostApk),\ |
| 139 | + /data/local/tmp/OldBrokerHost.apk=$(Pipeline.Workspace)/oldBrokerHost/$(oldBrokerHostApk),\ |
| 140 | + /data/local/tmp/AzureSample.apk=$(Pipeline.Workspace)/azureSample/$(azureSampleApk)" |
| 141 | + resultsDir: "msal-BrokerHost-$(Build.BuildId)-$(Build.BuildNumber)" |
| 142 | + firebaseDeviceId: ${{ parameters.firebaseDeviceId }} |
| 143 | + firebaseDeviceAndroidVersion: ${{ parameters.firebaseDeviceAndroidVersion }} |
0 commit comments