Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staticWebApp - support Azure DevOps repositories #1050

Open
gursharan001 opened this issue Jul 11, 2023 · 3 comments
Open

staticWebApp - support Azure DevOps repositories #1050

gursharan001 opened this issue Jul 11, 2023 · 3 comments

Comments

@gursharan001
Copy link
Contributor

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.

@martinbryant
Copy link
Contributor

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.

@gursharan001
Copy link
Contributor Author

gursharan001 commented Jul 21, 2023

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

  1. 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
  2. I had to pass in a empty repository token even though it's not required
  3. is there a way to specify sku and tier as well

Many thanks for your reply!

@martinbryant
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants