Multi-environment deployments with Azure DevOps and Static Web Apps

Sdílet
Vložit
  • čas přidán 4. 07. 2024
  • 00:26 - App walkthrough
    00:48 - Create a static web app with an Azure DevOps pipeline
    02:13 - Add Azure DevOps environments and configure approvals
    02:54 - Configure a multi-stage pipeline
    06:26 - Static Web Apps named preview environments
    06:47 - Playwright tests
    07:43 - Manual approval before production deployment
    08:09 - Secure staging environments with a password
    Learn more:
    App used in video:
    github.com/anthonychu/swa-dev...
    Create a static web app with Azure DevOps pipeline:
    docs.microsoft.com/azure/stat...
    Static Web Apps named environments:
    docs.microsoft.com/azure/stat...
  • Věda a technologie

Komentáře • 7

  • @glenn8781
    @glenn8781 Před 5 dny

    Followed this video to edit the pre-made yaml file to add a staging environment. However, I'm unable to add the environment key as is shown in this video @ 3:40 . The YAML editor on Azure doesn't recognize the environment key and shows a yellow squiggly line under it and fails validation as well. Therefore, I'm not able to point this pipeline to the Staging and Production environments I created as per this video. I do get the named preview as staging (due to deployment_environment set to staging) but since I added steps to deploy to production as well in the yaml, and since this doesn't point to the newly created Production environment, I don't get asked any approvals and deployment to production happens immediately after deployment to staging.

  • @ahmedalhallag3338
    @ahmedalhallag3338 Před rokem +1

    Great video Anthony! I have a question, I'm still learning about CI/CD, I've been developing a django web app (locally) in python and i used playwright for the first time. Is it possible to automate playwright tests on azuredevops without deploying? Sorry for the naive question

    • @nthonychu
      @nthonychu  Před rokem

      I believe this is possible, although I'm not sure if it's available in the Python version of Playwright yet. In your pipeline, you should be able to run your Playwright tests and Playwright can automatically start your Django app too so the tests will test it over localhost. This is the configuration for Node.js: playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests

  • @gouthamkamre2039
    @gouthamkamre2039 Před 10 měsíci

    How to deploy WordPress site on azure static webapp

  • @iloos7457
    @iloos7457 Před 4 měsíci

    Can i use github actions to do multi staging too?

  • @davidpurge60
    @davidpurge60 Před rokem

    I think that running deployments from a build pipeline is not a good practice. You have shown how to tightly couple a build with deployment to one specific environment. This coupling has many problems - just imagine that your organization has 30 test environments and various test teams want to upgrade and downgrade their environments at will at the time of their choosing and you should start seeing problems with your approach. I think a better architecture is when the build is only responsible for creating a properly versioned artifact that can be copied around and deployed to any environment. IMHO deployments are better done from the release pipelines, separately from builds.

    • @iloos7457
      @iloos7457 Před 4 měsíci

      Hey man, found this very insightful. Would you be open to talk about it. I want to learn more