forked from microsoft/Microsoft365DSC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
22 lines (20 loc) · 1.32 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pr:
- Dev
pool:
vmImage: 'windows-2019'
steps:
- task: CopyFiles@2
displayName: "Obtain Files from GitHub"
inputs:
SourceFolder: '.'
TargetFolder: '$(build.artifactstagingdirectory)/BuildFiles'
- task: PowerShell@2
displayName: "Import TestHarness Module"
inputs:
targetType: 'inline'
failOnStderr: true
script: Install-Module Microsoft.Online.SharePoint.PowerShell -RequiredVersion "16.0.19515.12000" -Force;Install-Module AzureAD -RequiredVersion "2.0.2.4" -Force; Install-Module MicrosoftTeams -RequiredVersion "1.0.3" -Force;Install-Module SharePointPnPPowerShellOnline -RequiredVersion "3.17.2001.2" -Force;Install-Module MSOnline -Requiredversion "1.1.183.17" -Force;Install-Module ReverseDSC -Requiredversion "2.0.0.2" -Force;Install-Module MSCloudLoginAssistant -Force -RequiredVersion "0.8.3";Install-Module Microsoft.PowerApps.Administration.PowerShell -Force -RequiredVersion 2.0.26;[System.Environment]::SetEnvironmentVariable('O365DSCTelemetryEnabled', $false, [System.EnvironmentVariableTarget]::Machine);Import-Module '$(build.artifactstagingdirectory)\BuildFiles\Tests\TestHarness.psm1' -Force;$results = Invoke-TestHarness; if ($results.FailedCount -gt 0){throw "Unit Test Failed"}
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'Package'