Deploying Azure Static Web Apps with Azure DevOps

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น •

  • @MarkJones-yy6hn
    @MarkJones-yy6hn 2 ปีที่แล้ว +7

    Can you include your yaml file and powershell script for reference? since that's what you used for the demo instead of a starter pipeline.

  • @AtleMagnussen
    @AtleMagnussen 3 ปีที่แล้ว +4

    Great video but I'm gonna ask the same as Diego. Is it possible to arrange like the "normal" Azure Devops flow? With build pipeline first and then a release pipeline

  • @DiogoMudo
    @DiogoMudo 3 ปีที่แล้ว +7

    I went through hell and back again to create a deployment pipeline for static website into a storage account using Azure DevOps. Great timing, lol!
    One question tough, I noticed it is deployed straight into the build pipeline, and not on a release pipeline.
    How would you manage release rollback on this scenario?

    • @TheAprilEdwards
      @TheAprilEdwards 3 ปีที่แล้ว +1

      Sorry it was painful...but it's much easier now! The product team appreciates the feedback to continue making it an awesome product

    • @DiogoMudo
      @DiogoMudo 3 ปีที่แล้ว +1

      @@TheAprilEdwards thank you. Keep up the good work. I noticed it is possible to add the task to a release task, with the skip build option. I'm going to give it a try.

    • @DiegoGomes256
      @DiegoGomes256 3 ปีที่แล้ว

      @@DiogoMudo did it work for you? I'm also trying to do the same.

    • @DiogoMudo
      @DiogoMudo 3 ปีที่แล้ว +1

      @@DiegoGomes256 I didn't try the way presented on the video, I stuck with my "workaround", hosting inside a regular storage account

    • @DiogoMudo
      @DiogoMudo 3 ปีที่แล้ว

      @@DiegoGomes256 Anyway let me tell you the "gotchas" that I had to do to make my react static site work with a CI/CD pipeline, using the "Az File Copy" job on the release pipeline. The CI pipline just calls webpack to build the static site on release mode, and produces a "drop" artifact:
      - You must give your Azure Devops Service Principal the "Storage Blob Contributor" role on your storage account
      - On the Az File Copy job (release pipeline) you should add the option "--blob-type Detect" or it will default to "PageBlob", and sometimes your storageaccount may be of the "BlockBlob" type
      - On the Az File Copy job (release pipeline),you shoud "tail" your source directory with " /drop/*"
      -On the Az File Copy job (release pipeline), the complete text for the options box should be: --overwrite=true --blob-type Detect --follow-symlinks --recursive

  • @azureNETCode
    @azureNETCode 2 ปีที่แล้ว +1

    She glossed over the yaml task props and it doesn't work as shown. Error with app_location: The app build failed to produce artifact folder: 'public'. Please ensure this property is configured correctly in your deployment configuration file. Any ideas?

    • @azureNETCode
      @azureNETCode 2 ปีที่แล้ว

      edit: I think I got it: you have to set the output_location to 'wwwroot' in your yaml task for a successful deploy. FYI, I am using a blazor WASM PWA

  • @rameshreddy5405
    @rameshreddy5405 3 ปีที่แล้ว +1

    Thanks for this. But the screen is not clear so we are unable to see pipeline tasks

    • @apriledwards3422
      @apriledwards3422 3 ปีที่แล้ว

      Sorry about that as this was recorded remotely. If you go into Azure Pipelines and type out the task name you will see it in the marketplace. Search 'Azure Static Web App'

  • @MarkoVukovic0
    @MarkoVukovic0 9 หลายเดือนก่อน

    I'm trying to build and deploy a .NET 8.0 app, which builds fine using windows-latest as vm image but when it comes to deploy, it's trying to run swaclient in a Linux Docker container. So, I try using ubuntu-latest and then it complains that msbuild is too old, and there doesn't seem to be a way to force that to upgrade. I have tried to add tasks to update the .NET SDK and Nuget but to no avail, same error :/

  • @alexandrunistor8535
    @alexandrunistor8535 3 ปีที่แล้ว +1

    How do you delete a Static Site? I delete it and when I run my infrastructure pipeline it says it is already there. I check again the azure portal, everything is back in place.
    I run my front-end deployment it says the site is flagged for deletion.
    There is no function to purge the site after deletion (similiar to Key Vault).

    • @TheAprilEdwards
      @TheAprilEdwards 3 ปีที่แล้ว

      Thanks for the question, I would suggest giving that feedback to the product group: github.com/Azure/static-web-apps/issues. I have deleted mine from the portal directly and not had an issue. But yes, from a pipeline it tends to linger a bit. Definitely open up an issue so they can look into it. I also added a script to clean up resources from my pipeline upon deletion.

  • @ahmedma527
    @ahmedma527 7 หลายเดือนก่อน

    can you please include the yaml file or tell us how to write that script ?

  • @danilkrymskiy3431
    @danilkrymskiy3431 4 หลายเดือนก่อน

    "Azure Function and staging details" still have 5 same regions to deploy, 3 years later. Thanks for the content though.

  • @Corrado49
    @Corrado49 3 ปีที่แล้ว

    This is so helpful, thanks!

  • @morettimaxi
    @morettimaxi 2 ปีที่แล้ว

    Where is the azure pipeline? Can you share the url?

  • @daviddechaux7230
    @daviddechaux7230 2 ปีที่แล้ว +4

    Something weird on this video.
    You create a Static Web App name "SDD-Site" with URL "salmon-rock", but at the end you show us that it works on "template-blog" at the url "gentle-coast".
    We can clearly se at 8:32 that your build failed.
    The logs you show at 11:37 are not the proper one. We can see that the steps are not even the same as the YAML that you show us previously.
    I know that the technology works, but not your demo.

  • @kwanyeowchyuan8768
    @kwanyeowchyuan8768 3 ปีที่แล้ว

    Is it recommended to have WAF in front Azure Static Web?

    • @apriledwards3422
      @apriledwards3422 3 ปีที่แล้ว

      It depends on what you want to achieve. To secure the front end, provide some resiliency, yes.

  • @zolty96
    @zolty96 2 ปีที่แล้ว +2

    so many question below and no answer

  • @RageshTR
    @RageshTR 3 ปีที่แล้ว

    What is that Nuget security analysis task?

    • @TheAprilEdwards
      @TheAprilEdwards 3 ปีที่แล้ว

      Sorry, which one are you referring to?

  • @jacobtb1
    @jacobtb1 3 ปีที่แล้ว

    perfect

  • @stevengibson4773
    @stevengibson4773 2 ปีที่แล้ว +3

    Why even bother explaining what you are doing if you skip steps and obfuscate parts of it

  • @anrisi86
    @anrisi86 ปีที่แล้ว

    Wrong way, deployment should be in release pipeline not in build pipeline

    • @AzureDevOps
      @AzureDevOps  ปีที่แล้ว

      Not exactly true. In the 'former' days of ADO, yes, but the standard is to build your CI/CD in the 'Pipeline', removing the 'Build' title from the product. You can reference the docs here: learn.microsoft.com/azure/devops/pipelines/create-first-pipeline
      Then moving the 'Release Pipeline' to call your artifacts. You can reference the docs here: learn.microsoft.com/en-us/azure/devops/pipelines/get-started/key-pipelines-concepts