How do I run Deployment frequency jobs on self-hosted runners with Azure Pipelines?

To run deployment frequency jobs on self-hosted runners with Azure Pipelines, you need to configure your YAML pipeline to specify the self-hosted agent and the jobs that schedule deployments. Below is a guide on how to set this up effectively.

Step-by-Step Guide

1. Ensure you have your self-hosted runner set up and registered with your Azure DevOps organization.

2. Create or edit your Azure Pipelines YAML file to configure the deployment jobs. Make sure to specify the 'pool' with your self-hosted runner.

3. You can schedule your deployment jobs using the `schedules` keyword in your YAML file.

Example YAML Configuration

jobs: - job: Deploy pool: name: 'YourSelfHostedPool' steps: - script: echo "Running deployment job..." displayName: 'Deploy Application' - task: AzureWebApp@1 inputs: azureSubscription: 'YourAzureSubscription' appName: 'YourWebAppName' package: '$(System.DefaultWorkingDirectory)/**/*.zip' triggers: branches: include: - main schedules: - cron: "0 0 * * *" displayName: Daily midnight deployment branches: include: - main

Azure Pipelines self-hosted runners deployment frequency jobs YAML configuration CI/CD