# Generated by `sfdt ci init --provider azure --type deploy`.
# A standalone Azure Pipelines definition for smart delta validation on PRs:
# a code quality scan (advisory) followed by a check-only deploy. Generate the
# matching real-deploy pipeline with --type release.
#
# The quality scan expects a committed .sfdt/config.json (run `sfdt init`).
#
# Required pipeline variables (Pipelines > Library / pipeline variables, secret):
{{authSecretsDoc}}
trigger: none
pr:
  branches:
    include:
      - '*'
pool:
  vmImage: ubuntu-latest
steps:
  - checkout: self
    fetchDepth: 0
  - task: NodeTool@0
    inputs:
      versionSpec: '{{nodeVersion}}'
  - script: npm install --global @salesforce/cli
    displayName: Install Salesforce CLI
  {{authSteps}}
  {{qualitySteps}}
  - script: npx --yes @sfdt/cli@latest deploy --smart --org {{org}} --delta-base "origin/$(System.PullRequest.TargetBranch)" --dry-run
    displayName: Smart delta validation
