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

PROD MSAL to DEV BROKER #1716

Open
wants to merge 22 commits into
base: dev
Choose a base branch
from
Open
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# run MSAL with Broker UI automation testcases
# Variable: 'ENV_VSTS_MVN_ANDROIDADACCOUNTS_USERNAME' was defined in the Variables tab
# Variable: 'gCloudProjectId' was defined in the Variables tab
# Variable: 'mvnAccessToken' was defined in the Variables tab
name: $(Build.BuildId)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)

trigger: none
pr: none

schedules:
- cron: "0 5 * * 1-6" # 5:00 AM UTC everyday Mon-Sat
displayName: Daily Local MSAL UI Automation with Prod Broker Run
branches:
include:
- dev
always: true

parameters:
- name: firebaseDeviceId
type: string
displayName: Firebase Device Id
default: blueline
values:
- blueline
- flame
- redfin
- sailfish
- walleye
- bluejay
- oriole
- name: firebaseDeviceAndroidVersion
displayName: Firebase Device Android Version
type: number
default: 28
values:
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- name: testTargetPackages
displayName: Packages as Test Targets
type: string
default: package com.microsoft.identity.client.msal.automationapp.testpass.broker, notAnnotation org.junit.Ignore
- name: oldBrokerHostVersion
displayName: Old Broker host Version
type: string
default: '0.0.1'
- name: msalVersion
displayName: MSAL Version
type: string
- name: companyPortalVersion
displayName: Company Portal Version
type: string
default: '*'
- name: authenticatorVersion
displayName: Authenticator Version
type: string
default: '*'
- name: oldAuthenticatorVersion
displayName: Old Authenticator Version
type: string
default: '6.2204.2470'
- name: internalFeedName
type: string
default: 'AndroidAdal'

variables:
engineeringProjectId: 'fac9d424-53d2-45c0-91b5-ef6ba7a6bf26'
azureSamplePipelineId: 1458
brokerHostPipelineId: 1432
msazureServiceConnection: AndroidBroker-CI
msazureFeedName: Android-Broker
azureSampleApk: AzureSample-local-debug.apk
brokerHostApk: brokerHost-local-debug.apk
oldBrokerHostApk: brokerHost-local-debug.apk
companyPortalApk: com.microsoft.windowsintune.companyportal-signed.apk
authenticatorApk: app-production-universal-release-signed.apk
oldAuthenticatorApk: Authenticator-4.1.0-RC.apk
firebaseTimeout: 45m

stages:
# msalautomationapp
- stage: 'msalautomationapp'
displayName: Build MSAL Automation APKs
jobs:
- template: ./templates/build-msal-automation-app.yml
parameters:
brokerFlavor: AutoBroker
msalFlavor: Dist
brokerSource: LocalApk
msalVersion: ${{ parameters.msalVersion }}
# Brokers
- stage: 'brokers'
dependsOn: [] # this removes the implicit dependency on previous stage and causes this to run in parallel
displayName: Brokers and Azure Sample APKs
jobs:
- job: 'download_brokers'
displayName: Download Brokers
pool:
vmImage: ubuntu-latest
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
displayName: 'Download latest Azure Sample'
inputs:
buildType: 'specific'
project: '$(engineeringProjectId)'
definition: '$(azureSamplePipelineId)'
artifactName: AzureSample
itemPattern: '**/*.apk'
targetPath: '$(Build.ArtifactStagingDirectory)/azureSample'
buildVersionToDownload: 'latest'
- task: DownloadPipelineArtifact@2
displayName: 'Download Broker Host'
inputs:
buildType: specific
project: '$(engineeringProjectId)'
definition: '$(brokerHostPipelineId)'
artifactName: BrokerHost
itemPattern: '**/*.apk'
targetPath: '$(Build.ArtifactStagingDirectory)/brokerHost'
- task: UniversalPackages@0
displayName: 'Download old brokerHost version from feed'
inputs:
command: 'download'
downloadDirectory: '$(Build.ArtifactStagingDirectory)/oldBrokerHost'
feedsToUse: 'external'
externalFeedCredentials: '$(msazureServiceConnection)'
feedDownloadExternal: '$(msazureFeedName)'
packageDownloadExternal: 'broker-host'
versionDownloadExternal: '${{ parameters.oldBrokerHostVersion }}'
- task: UniversalPackages@0
displayName: 'Download com.microsoft.windowsintune.companyportal-signed'
inputs:
command: 'download'
downloadDirectory: '$(Build.ArtifactStagingDirectory)/brokers'
feedsToUse: 'external'
externalFeedCredentials: '$(msazureServiceConnection)'
feedDownloadExternal: '$(msazureFeedName)'
packageDownloadExternal: 'com.microsoft.windowsintune.companyportal-signed'
versionDownloadExternal: '${{ parameters.companyPortalVersion }}'
- task: UniversalPackages@0
displayName: 'Download com.azure.authenticator'
inputs:
command: 'download'
downloadDirectory: '$(Build.ArtifactStagingDirectory)/brokers'
feedsToUse: 'external'
externalFeedCredentials: '$(msazureServiceConnection)'
feedDownloadExternal: '$(msazureFeedName)'
packageDownloadExternal: 'com.azure.authenticator'
versionDownloadExternal: '${{ parameters.authenticatorVersion }}'
- task: UniversalPackages@0
displayName: 'Download old authenticator (Pre v5 Broker) version from feed'
inputs:
command: 'download'
downloadDirectory: '$(Build.ArtifactStagingDirectory)/brokers/oldAPKs'
feedsToUse: 'internal'
vstsFeed: '${{ parameters.internalFeedName }}'
vstsFeedPackage: 'com.azure.authenticator'
vstsPackageVersion: '${{ parameters.oldAuthenticatorVersion }}'
- publish: $(Build.ArtifactStagingDirectory)/brokers
displayName: 'Publish Authenticator/Company Portal Broker apks for later use'
artifact: brokerapks
- publish: $(Build.ArtifactStagingDirectory)/azureSample
displayName: 'Publish Azure Sample apk for later use'
artifact: azureSample
- publish: $(Build.ArtifactStagingDirectory)/brokerHost
displayName: 'Publish Broker Host apk for later use'
artifact: brokerHost
- publish: $(Build.ArtifactStagingDirectory)/oldBrokerHost
displayName: 'Publish Broker Host old apk for later use'
artifact: oldBrokerHost
# MSAL with Broker Test Plan stage
- stage: 'msal_with_broker'
dependsOn:
- msalautomationapp
- brokers
displayName: Running MSAL with Broker Test UI Test Suite
jobs:
- template: ./templates/flank/run-on-firebase-with-flank.yml
parameters:
automationAppApkPath: "$(Pipeline.Workspace)/msalautomationapks/msalautomationapp-dist-AutoBroker-debug.apk"
automationAppTestApkPath: "$(Pipeline.Workspace)/msalautomationapks/msalautomationapp-dist-AutoBroker-debug-androidTest.apk"
testTargetPackages: ${{ parameters.testTargetPackages }}
resultsHistoryName: "Prod MSAL with Dev Broker (BrokerHost)"
otherFiles:
"/data/local/tmp/BrokerHost.apk=$(Pipeline.Workspace)/brokerHost/$(brokerHostApk),\
/data/local/tmp/OldBrokerHost.apk=$(Pipeline.Workspace)/oldBrokerHost/$(oldBrokerHostApk),\
/data/local/tmp/CompanyPortal.apk=$(Pipeline.Workspace)/brokerapks/$(companyPortalApk),\
/data/local/tmp/Authenticator.apk=$(Pipeline.Workspace)/brokerapks/$(authenticatorApk),\
/data/local/tmp/OldAuthenticator.apk=$(Pipeline.WorkSpace)/brokerapks/oldAPKs/$(oldAuthenticatorApk),\
/data/local/tmp/AzureSample.apk=$(Pipeline.Workspace)/azureSample/$(azureSampleApk)"
resultsDir: "msal-BrokerHost-$(Build.BuildId)-$(Build.BuildNumber)"
firebaseDeviceId: ${{ parameters.firebaseDeviceId }}
firebaseDeviceAndroidVersion: ${{ parameters.firebaseDeviceAndroidVersion }}
...