Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable source code checkout in specific pipeline stages

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?

like image 345
jhurtas Avatar asked Aug 30 '25 14:08

jhurtas


1 Answers

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'
like image 199
Shamrai Aleksander Avatar answered Sep 02 '25 11:09

Shamrai Aleksander