我有这样的剧本:
trigger:
- master
pool:
name: Mobile-Pool
agent: 'MacMini3-AMS'
vmImage: 'MacMini3-AMS'
steps:
- task: Gradle@2
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx4096m'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: 'clean assembleDebug testDebugUnitTest'
# Bash
# Run a Bash script on macOS, Linux, or Windows
- task: Bash@3
inputs:
targetType: 'filePath'
filePath: 'run-tests-on-emulator.sh'
- task: Gradle@2
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx4096m'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: 'connectedDebugAndroidTest'我在运行我自己的硬件。我有MacMini3和MacMini2。MacMini2没有正确编译,我想在MacMini3上运行。如何更改yaml脚本以做到这一点?

发布于 2020-06-01 08:35:07
您应该使用需求来确保您的管道所需的功能存在于运行它的代理上。
pool:
name: MyPool
demands:
- myCustomCapability # check for existence of capability
- agent.os -equals Darwin # check for specific string in capability在您的场景中,您可以使用Agent.Name或Agent.ComputerName需求。
https://stackoverflow.com/questions/62118476
复制相似问题