farmer
farmer copied to clipboard
staticWebApp - support Azure DevOps repositories
We deploy from a Azure DevOps repository to a static web app. Following ArmResource
creates such a web app (Azure DevOps pipeline does the deployment).
$"""{{
"apiVersion": "2021-01-01",
"location": "East Asia",
"name": "app-name",
"type": "Microsoft.Web/staticSites",
"sku": {{
"tier": "Standard",
"name": "Standard"
}},
"properties": {{
"provider": "DevOps",
"repositoryUrl": "https://dev.azure.com/<org>/_git/<repo>",
"branch": "main",
"repositoryToken": null,
"buildProperties": {{
"appLocation": "/",
"apiLocation": "",
"appArtifactLocation": ""
}}
}}
}}"""
Can this support be added to staticWebApp
? I am happy to attempt a PR.
Hi @gursharan001 . So am I right in saying that the arm template example you have given deployed the web app correctly?
You can of course add the "provider" key of "DevOps" to the app_settings parameter in Farmer currently from what I can see.
Hi @martinbryant , yes I was able to deploy using the ArmResource
definition with farmer instead of staticWebApp
builder.
I tried specifying DevOps
in app_settings
as you suggested and it works
- is there a way to specify resource location at staticWebApp level. I had to change resource group locations to one of the acceptable ones to Azure static sites
- I had to pass in a empty repository token even though it's not required
- is there a way to specify sku and tier as well
Many thanks for your reply!
Hi @gursharan001 from what I can see in Farmer staticWebApp
builder, all 3 points you have mentioned would need adding to the dsl.
Happy to look at your PR if you would like to.