Skip to content

Instantly share code, notes, and snippets.

@gsscoder
Last active March 5, 2020 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsscoder/adea2b485c069eb139ddc042745a22cb to your computer and use it in GitHub Desktop.
Save gsscoder/adea2b485c069eb139ddc042745a22cb to your computer and use it in GitHub Desktop.
Azure Pipeline step to check it's pool or fail
trigger:
- none
pool:
vmImage: 'windows-latest'
steps:
- powershell: |
$value = Select-String -Path 'azure-pipelines.yml' -Pattern "(?<=vmImage:\s').*(?='$)"
if ($value -like '*windows*') {
exit 0
}
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment