Merge pull request #13095 from umbraco/v10/feature/export-test-artifact
V10: Export test artifacts
This commit is contained in:
@@ -468,19 +468,22 @@ stages:
|
||||
targetType: inline
|
||||
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
|
||||
script: 'npm run test --ignore-certificate-errors'
|
||||
- bash: |
|
||||
if [ -f $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/results/ ]; then
|
||||
echo "##vso[task.setVariable variable=myfileexists]true"
|
||||
fi
|
||||
- task: PowerShell@2
|
||||
displayName: Check if artifacts folder exists
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: |
|
||||
$MyVariable = Test-Path -Path $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/results
|
||||
Write-Host "##vso[task.setvariable variable=resultFolderExists;]$MyVariable"
|
||||
- task: CopyFiles@2
|
||||
displayName: Prepare artifacts
|
||||
condition: eq(variables.myfileexists, 'true')
|
||||
condition: eq(variables.resultFolderExists, 'True')
|
||||
inputs:
|
||||
sourceFolder: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/results/
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)/playwright
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: "Publish test artifacts"
|
||||
condition: eq(variables.myfileexists, 'true')
|
||||
condition: eq(variables.resultFolderExists, 'True')
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
artifact: 'E2E artifacts - $(Agent.OS) - Attempt #$(System.JobAttempt)'
|
||||
|
||||
Reference in New Issue
Block a user