# Generated by `sfdt ci init --provider bitbucket --type deploy`.
# Merge this `pull-requests` pipeline into your bitbucket-pipelines.yml. Runs a
# code quality scan (advisory) and a smart delta check-only deploy on pull
# requests (delta vs the destination branch). Generate the matching real-deploy
# pipeline with --type release.
#
# The quality scan expects a committed .sfdt/config.json (run `sfdt init`).
#
# Required repository variables (Repository settings > Pipelines > Variables, secured):
{{authSecretsDoc}}
pipelines:
  pull-requests:
    '**':
      - step:
          name: SFDT Smart Deploy
          image: {{image}}
          clone:
            depth: full
          script:
            {{cliSetup}}
            {{authSteps}}
            {{qualitySteps}}
            - {{cli}} deploy --smart --org {{org}} --delta-base "origin/$BITBUCKET_PR_DESTINATION_BRANCH" --dry-run
