Reputation: 694
I have a pipeline with multiple stages, and the source code is checked out automatically on all of them. I do not need the source code, but only published artifacts.
How can disable source code checkout for specific stages?
Upvotes: 37
Views: 27742
Reputation: 16133
Use Checkout option: https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema#checkout
Example:
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: no_checkout
steps:
- checkout: none
- script: echo Hello, world!
displayName: 'Run a one-line script'
- job: checkout
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
Upvotes: 72