11# File: azure-pipelines\pull-request-validation\build-consumers.yml
22# Description: Test new common in ADAL / MSAL / Broker (assembleLocal and testLocalDebugUnitTest)
3- # Variable: 'ENV_VSTS_MVN_ANDROIDADACCOUNTS_USERNAME' was defined in the Variables tab
43# https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate
54# Variable: 'commonBranchName' common branch to be used when running the pipeline manually
65# Variable: 'skipConsumerValidationLabel' PR label used to skip the checks in this pipeline
@@ -36,11 +35,6 @@ resources:
3635 name : AzureAD/ad-accounts-for-android
3736 ref : dev
3837 endpoint : ANDROID_GITHUB
39- - repository : adal
40- type : github
41- name : AzureAD/azure-activedirectory-library-for-android
42- ref : dev
43- endpoint : ANDROID_GITHUB
4438
4539stages :
4640- stage : getLabel
@@ -121,6 +115,10 @@ stages:
121115 git status
122116 git rev-parse HEAD
123117 workingDirectory : $(Agent.BuildDirectory)/s/common
118+ - bash : |
119+ echo "##vso[task.setvariable variable=ENV_VSTS_MVN_CRED_USERNAME]VSTS"
120+ echo "##vso[task.setvariable variable=ENV_VSTS_MVN_CRED_ACCESSTOKEN]$(System.AccessToken)"
121+ displayName: 'Set VSTS Fields in Environment'
124122 - task : Gradle@3
125123 displayName : Assemble msal
126124 inputs :
@@ -154,6 +152,10 @@ stages:
154152 clean : true
155153 submodules : recursive
156154 persistCredentials : True
155+ - bash : |
156+ echo "##vso[task.setvariable variable=ENV_VSTS_MVN_CRED_USERNAME]VSTS"
157+ echo "##vso[task.setvariable variable=ENV_VSTS_MVN_CRED_ACCESSTOKEN]$(System.AccessToken)"
158+ displayName: 'Set VSTS Fields in Environment'
157159 - template : ../templates/steps/automation-cert.yml
158160 - task : CmdLine@2
159161 displayName : Checkout common submodule $(commonBranch)
@@ -195,6 +197,10 @@ stages:
195197 clean : true
196198 submodules : recursive
197199 persistCredentials : True
200+ - bash : |
201+ echo "##vso[task.setvariable variable=ENV_VSTS_MVN_CRED_USERNAME]VSTS"
202+ echo "##vso[task.setvariable variable=ENV_VSTS_MVN_CRED_ACCESSTOKEN]$(System.AccessToken)"
203+ displayName: 'Set VSTS Fields in Environment'
198204 - task : AzureKeyVault@2
199205 displayName : ' Get Key vault LabAuth'
200206 inputs :
@@ -208,11 +214,6 @@ stages:
208214 inputs :
209215 targetType : inline
210216 script : java -version
211- - task : CmdLine@1
212- displayName : Set MVN Access Token in Environment
213- inputs :
214- filename : echo
215- arguments : ' ##vso[task.setvariable variable=ENV_VSTS_MVN_ANDROIDADACCOUNTS_ACCESSTOKEN]$(System.AccessToken)'
216217 - task : CmdLine@1
217218 displayName : Set Office MVN Access Token in Environment
218219 inputs :
@@ -257,40 +258,3 @@ stages:
257258 testResultsFormat : ' JUnit'
258259 testResultsFiles : ' **/TEST-*.xml'
259260 searchFolder : ' LinuxBroker'
260- # adal
261- - job : adalValidation
262- displayName : ADAL
263- dependsOn :
264- - setupBranch
265- variables :
266- commonBranch : $[ dependencies.setupBranch.outputs['setvarStep.commonBranch'] ] # map in the variable
267- condition : and( succeeded(), not(contains(variables['prLabels'], variables['skipConsumerValidationLabel'])) )
268- steps :
269- - checkout : adal
270- displayName : Checkout adal repository
271- clean : true
272- submodules : recursive
273- persistCredentials : True
274- - task : CmdLine@2
275- displayName : Checkout common submodule $(commonBranch)
276- inputs :
277- script : |
278- git fetch
279- git checkout $(commonBranch)
280- git pull
281- git status
282- git rev-parse HEAD
283- workingDirectory : $(Agent.BuildDirectory)/s/common
284- - template : ../templates/steps/automation-cert.yml
285- - task : Gradle@3
286- displayName : Assemble adal
287- inputs :
288- tasks : clean adal:assembleLocal
289- jdkArchitecture : x64
290- jdkVersionOption : " 1.17"
291- - task : Gradle@3
292- displayName : Run adal Unit tests
293- inputs :
294- tasks : adal:testLocalDebugUnitTest -Plabtest -ProbolectricSdkVersion=${{variables.robolectricSdkVersion}} -PlabSecret=$(LabVaultAppCert)
295- jdkArchitecture : x64
296- jdkVersionOption : " 1.17"
0 commit comments