Change Pipeline Variable at Run Time
Learn how to allow users to change the values of the pipeline variables before running the pipeline.
We'll cover the following...
We'll cover the following...
Instead of hard-coding the priority value in the Maven goals, we use the $(Priority)
variable:
Press + to interact
- 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=$(Priority)' <--------------------
But if we want to run the tests that belong to the Medium
group instead of High
, we have to change the Priority
pipeline variable value from High
to Medium
and re-save the ...