Azure Devops – Execute task before Source Code Checkout

Sometimes we need to execute several tasks before Source Code Checkout – Install Certificates configure git. This Market Place solution can be very helpful:

https://marketplace.visualstudio.com/items?itemName=jessehouwing.pre-post-tasks

Sample task:

# Starter pipeline
trigger:
– none
pool:
  name: privatepool
steps:
– task: jessehouwing.pre-post-tasks.Pre-CmdLineV2.Pre-CmdLine@2
  displayName: ‘Pre’
  inputs:
    script: ‘du -sh /agent/* | sort -h’
– task: Bash@3
  displayName: ‘Main’
  inputs:
    targetType: ‘inline’
    script: |
      du -sh /agent/* | sort -h

Look like: