Run Jobs in Parallel
Learn how to run jobs in parallel by updating the maxParallel setting.
To run the jobs from the previous lesson in parallel, we just change the maxParallel
value from 1 to 3:
Press + to interact
trigger:- masterjobs:- job:pool:vmImage: 'ubuntu-latest'strategy:matrix:Tests_High:TestsPriority: "High"Tests_Medium:TestsPriority: "Medium"Tests_Low:TestsPriority: "Low"maxParallel: 3 <-----------steps:- task: Bash@3displayName: "create browser variable"inputs:targetType: 'inline'script: |export BROWSER=$(BROWSER)- task: Maven@3inputs:mavenPomFile: 'pom.xml'mavenOptions: '-Xmx3072m'javaHomeOption: 'JDKVersion'jdkVersionOption: '1.8'jdkArchitectureOption: 'x64'publishJUnitResults: truetestResultsFiles: '**/surefire-reports/TEST-*.xml'goals: 'clean test -Dgroups=$(TestsPriority)'- task: PublishBuildArtifacts@1displayName: 'Publish Log File as Artifact'inputs:PathtoPublish: $(System.DefaultWorkingDirectory)/target/logsArtifactName: 'logs_$(TestsPriority)'- task: PublishBuildArtifacts@1displayName: 'Publish Screenshots as Artifact'inputs:PathtoPublish: $(System.DefaultWorkingDirectory)/target/screenshotsArtifactName: 'screenshots_$(TestsPriority)'
As soon as the pipeline starts executing, you should ...