Examples
Use these sample YAML files as boilerplate to get started with your workflows.
Pull Request
trigger: none # This pipeline is triggered by pull requests via Branch Policies
# Dynamic variable group selection based on target branch
# PRs to main use prod credentials, PRs to stage use stage credentials, all others use dev
variables:
- ${{ if eq(variables['System.PullRequest.TargetBranch'], 'refs/heads/main') }}:
- group: symitar-prod
- ${{ elseif eq(variables['System.PullRequest.TargetBranch'], 'refs/heads/stage') }}:
- group: symitar-stage
- ${{ else }}:
- group: symitar-dev
pool:
name: ci-symitar
workspace:
clean: all
steps:
- checkout: self
fetchDepth: 0
# In the PR context, this will only validate changes between target and source branches
- task: ValidatePowerOn@1
displayName: 'Validate changed PowerOn files'
inputs:
connectionType: ssh
apiKey: $(apiKey)
symitarHostname: $(symitarHostname)
sshUsername: $(sshUsername)
sshPassword: $(sshPassword)
symitarUserNumber: $(symitarUserNumber)
symitarUserPassword: $(symitarUserPassword)
Merge Request
Release
Last updated