disast.rs :: now :: notes

I want to...

Run a pipeline in repository A when I open a PR for repository B

Only run a stage on master:

stages:
- stage: Production
  condition: eq(variables['Build.SourceBranch'], 'refs/heads/master'))

Only run a stage when the last one succeeded:

stages:
- stage: Production
  condition: succeeded()

Combine conditions:

stages:
- stage: Production
  condition: and(succeeded(), eq(variables['resources.pipeline.Artifact.sourceBranch'], 'refs/heads/master'))