For this Case you need to create a template :
sample :
main-template.yml
jobs:
- job: Build
steps:
- script: echo "Building project..."
displayName: 'Build Step'
project-pipeline.yml (pipeline for a specific project)
resources:
repositories:
- repository: templates
type: git
name: your-org/your-repo # Repository containing main templates
extends:
template: main-template.yml@templates # Using the master template
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.