Azure Pipelines allows running multiple tasks simultaneously within a single job by defining multiple parallel jobs in the pipeline. These jobs can run in parallel on different agents or on the same agent using multiple threads. To define parallel jobs, follow these steps:
Here's an example YAML definition for running two tasks in parallel:
jobs:
- job: ParallelJob
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
python:
- '3.6'
- '3.7'
node:
- '10.x'
- '12.x'
steps:
- task: PythonTask
displayName: 'Run Python Tests'
inputs:
versionSpec: '$(python)'
- task: NodeTask
displayName: 'Run Node Tests'
inputs:
versionSpec: '$(node)'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TEST-*.xml'
In this example, two parallel jobs are defined based on the matrix strategy for Python and Node.js versions. The PythonTask and NodeTask are executed in parallel on the specified agents, and the results are published using the PublishTestResults task.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-30 01:18:38 +0000
Seen: 7 times
Last updated: May 30 '23
How can popen() be used to direct streaming data to TAR?
In Python, can a string be utilized to retrieve a dataframe that has the same name as the string?
What is the method for merging field value and text into a singular line for display?
What is the method for programmatic access to a time series?