A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/pipeline-azure-pipelines below:

Configure a pipeline using Azure Pipelines

This article shows how to use the Azure Developer CLI (azd) to create a CI/CD pipeline with Azure DevOps Pipelines (Azure Pipelines) for an azd template. The pipeline enables you to push updates to a code repository and have your changes automatically provisioned and deployed to your Azure environment.

Prerequisites Initialize the template

This example uses the Hello-AZD template, but you can follow these steps for any template that includes a pipeline definition file (found in the .github or .azdo folders).

  1. In an empty directory, initialize the hello-azd template:

    azd init -t hello-azd
    
  2. When prompted, enter a name for the environment (for example, hello-azd).

Set up Azure Pipelines Create or use an Azure Pipelines organization

To use Azure Pipelines, you need an organization. Create one at https://dev.azure.com if you don't already have one.

Create a Personal Access Token (PAT)

The Azure Developer CLI requires a Personal Access Token (PAT) to configure Azure Pipelines. Create a new PAT with the following scopes:

Configure the pipeline
  1. Run the following command to configure an Azure Pipelines project and repository with a deployment pipeline:

    azd pipeline config --provider azdo
    
  2. Respond to the prompts:

  3. To verify the build, go to your project in the Azure Pipelines portal (https://dev.azure.com).

Make and push a code change
  1. In the /src/components/pages directory, open Home.razor.

  2. Change the Hello AZD! header text to Hello, pipeline! and save the file.

  3. Create a branch and commit your change. The main branch is protected, so push your changes from a new branch and create a Pull Request in Azure Pipelines. The pull request triggers the pipeline and blocks merging if the pipeline fails.

  4. Approve and merge your pull request to start the pipeline again.

  5. In your browser, open your project's repository to see your commit and the Azure Pipeline run.

  6. Visit the web frontend URL to inspect the update.

Use azd as an Azure Pipelines task

Add azd as an Azure Pipelines task to install azd in your pipeline. Add the following to .azdo/pipelines/azure-dev.yml:

trigger:
  - main
  - branch

pool:
  vmImage: ubuntu-latest
  # vmImage: windows-latest

steps:
  - task: setup-azd@0
    displayName: Install azd
Clean up resources

When you no longer need the Azure resources created in this article, run:

azd down
Next steps

Monitor your app using Azure Developer CLI (azd)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4