freeipa/ipatests/azure/templates/test-jobs.yml
Alexander Bokovoy 0187a746c9 Use stage and phase attempt counters when saving test artifacts
Azure Pipelines provide counters for running test jobs, these split into
System.StageAttempt and System.PhaseAttempt. Use them to make test
artifacts unique.

For XML test results we don't need to name them differently as they
aren't uploaded as artifacts but rather presented in a separate test
pane.

Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Stanislav Levin <slev@altlinux.org>
2019-07-17 13:10:34 +03:00

37 lines
1.2 KiB
YAML

parameters:
jobName: ''
jobTitle: ''
testsToIgnore: []
testsToRun: []
testsToDedicate: []
taskToRun: ''
tasksParallel: 1
jobs:
- job: ${{ parameters.jobName }}
displayName: ${{ parameters.jobTitle }}
dependsOn: Build
condition: succeeded()
pool:
vmImage: 'Ubuntu-16.04'
strategy:
parallel: ${{ parameters.tasksParallel }}
steps:
- template: setup-test-environment.yml
- template: run-test.yml
parameters:
containerName: 'freeipa-fedora-builder:latest'
logsPath: $(CI_RUNNER_LOGS_DIR)
taskToRun: ${{ parameters.taskToRun}}
testsToRun: ${{ join(' ', parameters.testsToRun ) }}
testsToIgnore: ${{ join(' ', parameters.testsToIgnore ) }}
testsToDedicate: ${{ join(' ', parameters.testsToDedicate ) }}
- task: PublishTestResults@2
inputs:
testResultsFiles: $(CI_RUNNER_LOGS_DIR)/nosetests.xml
testRunTitle: ${{parameters.jobTitle}} results
condition: succeededOrFailed()
- template: save-test-artifacts.yml
parameters:
logsArtifact: logs-${{parameters.jobName}}-$(Build.BuildId)-$(System.StageAttempt)-$(System.PhaseAttempt)-$(System.JobPositionInPhase)-$(Agent.OS)-$(Agent.OSArchitecture)