can we configure release with multistage release pipeline in azure devops,if yes what is the feasible solution

Megha S 0 Reputation points
2024-07-26T06:27:59.7566667+00:00

User's image

can we configure the pipeline in such way that when there is build for one artificat it only have to run its associated stage and it should not run all the artifact which is in sequence

Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
277 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,141 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 11,991 Reputation points
    2024-07-26T12:20:32.68+00:00

    Hello Megha S,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    Problem

    I understand that you like to know if it is possible to configure release with multistage release pipeline in Azure DevOps and if it is, what are the best solution.

    Solution

    You can configure a multistage release pipeline in Azure DevOps to divide your CI/CD process into different stages. In Azure DevOps, you can achieve this by customizing your release pipeline. To achieve this, the best practice is to use YAML pipelines.

    1. After you've created an Azure DevOps Project
    2. Create your App Service Instances.
    3. Build a YAML Pipeline.
      1. In your repository, create a azure-pipelines.yml file.
      2. Define three stages in your pipeline:
        1. Build > To build the source code and produce a package.
        2. Dev > To deploy the package to a development site for testing.
        3. Staging > To deploy to a staging Azure App Service instance with a manual approval check.
      3. Use tasks like dotnet build, dotnet publish, and az webapp deployment to achieve this.
    4. Configure Variables.
      1. In Azure DevOps, go to Pipelines > Library.
      2. Create a variable group named "Release."
      3. Add variables for your development and staging host names (replace the value 1234 with the correct instance value).
    5. Save and Trigger the Pipeline
      1. Save your YAML file.
      2. Commit your changes to trigger the pipeline.
      3. Verify the deployments in both development and staging environments.

    References

    Create a multistage pipeline with Azure DevOps.

    Create Multistage pipeline

    Multi-Stages in release pipeline with Pre-deployment approvals -YouTube.

    Accept Answer

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.

    Best Regards,

    Sina Salam

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.