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
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 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 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
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?
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'
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 :/
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).
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.
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.
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
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.
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
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?
Sorry it was painful...but it's much easier now! The product team appreciates the feedback to continue making it an awesome product
@@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.
@@DiogoMudo did it work for you? I'm also trying to do the same.
@@DiegoGomes256 I didn't try the way presented on the video, I stuck with my "workaround", hosting inside a regular storage account
@@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
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?
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
can you please include the yaml file or tell us how to write that script ?
Thanks for this. But the screen is not clear so we are unable to see pipeline tasks
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'
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 :/
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).
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.
"Azure Function and staging details" still have 5 same regions to deploy, 3 years later. Thanks for the content though.
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.
Is it recommended to have WAF in front Azure Static Web?
It depends on what you want to achieve. To secure the front end, provide some resiliency, yes.
Where is the azure pipeline? Can you share the url?
so many question below and no answer
This is so helpful, thanks!
What is that Nuget security analysis task?
Sorry, which one are you referring to?
perfect
Why even bother explaining what you are doing if you skip steps and obfuscate parts of it
Wrong way, deployment should be in release pipeline not in build pipeline
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