A way to run multiple instances of your pipeline sequentially is to associate your pipeline to an environment and then assign an exclusive lock to that environement. When multiple instances of your pipeline are triggered, only the first one is running. Whereas the other instances are queued and in waiting mode. However, those instances that are waiting for too long will be canceled automatically.
- From Pipelines > Environments, create an empty environment.
- From the newly created environment, open Approvals and checks
- Add Exclusive Lock.
- In your YAML pipeline file(e.g. azure-pipelines.yaml), add deployment and environment as follows:
... stages: - stage: LoadTesting displayName: Load Testing jobs: - deployment: LoadTestingTmpLock environment: load-testing-lock-environment - job: LoadTesting displayName: Load Testing ...