{"id":914,"date":"2021-09-25T23:46:30","date_gmt":"2021-09-25T10:46:30","guid":{"rendered":"https:\/\/blog.wiseowls.co.nz\/?p=914"},"modified":"2026-03-08T00:48:40","modified_gmt":"2026-03-07T11:48:40","slug":"azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline","status":"publish","type":"post","link":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/","title":{"rendered":"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline"},"content":{"rendered":"<p>Last time we <a href=\"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/08\/06\/azure-static-web-apps-custom-build-and-deployments\/\">took a peek under the hood<\/a> of Static Web Apps, we discovered a docker container that allowed us to do custom deployments. This however left us with an issue where we could create staging environments but could not quite call it a day as we could not cleanup after ourselves.<\/p>\n<h2 class=\"wp-block-heading\">There is more to custom deployments<\/h2>\n<p>Further inspection of GitHub actions config revealed there&#8217;s one more action that we could potentially exploit to get full advantage of custom workflows. It is called &#8220;close&#8221;:<\/p>\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">name: Azure Static Web Apps CI\/CD\n....\njobs:\n  close_pull_request_job:\n    ... bunch of conditions here\n    action: \"close\" # that is our hint!<\/code><\/pre>\n<p>With the above in mind, we can make an educated guess on how to invoke it with docker:<\/p>\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">docker run -it --rm \\\n   -e INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN=&lt;your deployment token&gt; \\\n   -e DEPLOYMENT_PROVIDER=DevOps \\\n   -e GITHUB_WORKSPACE=\"\/working_dir\" \\\n   -e IS_PULL_REQUEST=true \\\n   -e BRANCH=\"TEST_BRANCH\" \\\n   -e ENVIRONMENT_NAME=\"TESTENV\" \\\n   -e PULL_REQUEST_TITLE=\"PR-TITLE\" \\\n   mcr.microsoft.com\/appsvc\/staticappsclient:stable \\\n   .\/bin\/staticsites\/StaticSitesClient close --verbose<\/code><\/pre>\n<p>Running this indeed closes off an environment. That&#8217;s it!<\/p>\n<h2 class=\"wp-block-heading\">Can we build an ADO pipeline though?<\/h2>\n<p>Just running docker containers is not really that useful as these actions are intended for CI\/CD pipelines. Unfortunately, there&#8217;s no single config file we can edit to achieve it with Azure DevOps: we&#8217;d have to take a bit more hands on approach. Roughly the solution looks like so:<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"547\" src=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/ADO-SWA-PR-flow.png\" alt=\"Flow diagram showing Azure DevOps PR staging environment lifecycle for Static Web Apps\" class=\"wp-image-974\" srcset=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/ADO-SWA-PR-flow.png 1016w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/ADO-SWA-PR-flow-300x162.png 300w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/ADO-SWA-PR-flow-768x413.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n<p>First, we&#8217;ll create a <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/repos\/git\/branch-policies-overview?view=azure-devops\">branch policy<\/a> to kick off deployment to staging environment. Then we&#8217;ll use <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/repos\/git\/create-pr-status-server-with-azure-functions?view=azure-devops\">Service Hook<\/a> to trigger an Azure Function on successful PR merge. Finally, <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/static-web-apps\/publish-devops\">stock standard Static Web Apps<\/a> task will run on <code>master<\/code> branch when new commit gets pushed.<\/p>\n<h2 class=\"wp-block-heading\">Branch policy<\/h2>\n<p>Creating branch policy itself is very straightforward:  first we&#8217;ll need a separate pipeline definition:<\/p>\n<pre class=\"wp-block-code\"><code class=\"\">pr:\n  - master\n\npool:\n  vmImage: ubuntu-latest\n\nsteps:\n  - checkout: self    \n  - bash: |\n      docker run \\\n      --rm \\\n      -e INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN=$(deployment_token)  \\\n      -e DEPLOYMENT_PROVIDER=DevOps \\\n      -e GITHUB_WORKSPACE=\"\/working_dir\" \\\n      -e IS_PULL_REQUEST=true \\\n      -e BRANCH=$(System.PullRequest.SourceBranch) \\\n      -e ENVIRONMENT_NAME=\"TESTENV\" \\\n      -e PULL_REQUEST_TITLE=\"PR # $(System.PullRequest.PullRequestId)\" \\\n      -e INPUT_APP_LOCATION=\".\" \\\n      -e INPUT_API_LOCATION=\".\/api\" \\\n      -v ${PWD}:\/working_dir \\\n      mcr.microsoft.com\/appsvc\/staticappsclient:stable \\\n      .\/bin\/staticsites\/StaticSitesClient upload<\/code><\/pre>\n<p>In here we use a PR trigger, along with some variables to push through to Azure Static Web Apps. Apart from that, it&#8217;s a simple docker run that we have already had success with. To hook it up, we need a <code>Build Validation<\/code> check that would trigger this pipeline:<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"163\" src=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-12.png\" alt=\"Azure DevOps pipeline YAML configuration for SWA PR deployment\" class=\"wp-image-976\" srcset=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-12.png 456w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-12-300x107.png 300w\" sizes=\"auto, (max-width: 456px) 85vw, 456px\" \/><\/figure>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"769\" src=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-11.png\" alt=\"Static Web App staging environment created from pull request\" class=\"wp-image-975\" srcset=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-11.png 980w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-11-300x235.png 300w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-11-768x603.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n<\/p>\n<h2 class=\"wp-block-heading\">Teardown pipeline definition<\/h2>\n<p>Second part is a bit more complicated and requires an Azure Function to pull off. Let&#8217;s start by defining a pipeline that our function will run:<\/p>\n<pre class=\"wp-block-code\"><code class=\"\">trigger: none\n\npool:\n  vmImage: ubuntu-latest\n\nsteps:\n  - script: |\n      docker run --rm \\\n      -e INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN=$(deployment_token) \\\n      -e DEPLOYMENT_PROVIDER=DevOps \\\n      -e GITHUB_WORKSPACE=\"\/working_dir\" \\\n      -e IS_PULL_REQUEST=true \\\n      -e BRANCH=$(PullRequest_SourceBranch) \\\n      -e ENVIRONMENT_NAME=\"TESTENV\" \\\n      -e PULL_REQUEST_TITLE=\"PR # $(PullRequest_PullRequestId)\" \\\n      mcr.microsoft.com\/appsvc\/staticappsclient:stable \\\n      .\/bin\/staticsites\/StaticSitesClient close --verbose\n    displayName: 'Cleanup staging environment'<\/code><\/pre>\n<p>One thing to note here is manual trigger &#8211; we opt out of CI\/CD. Then, we make note of environment variables that our function will have to populate.<\/p>\n<h2 class=\"wp-block-heading\">Azure Function<\/h2>\n<p>It really doesn&#8217;t matter what sort of function we create. In this case we opt for C# code that we can author straight from the Portal for simplicity. We also need to <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/organizations\/accounts\/use-personal-access-tokens-to-authenticate?view=azure-devops&amp;tabs=preview-page\">generate a PAT<\/a> so our function can call ADO.<\/p>\n<pre class=\"wp-block-code\"><code lang=\"csharp\" class=\"language-csharp\">#r \"Newtonsoft.Json\"\n\nusing System.Net;\nusing System.Net.Http.Headers;\nusing System.Text;\nusing Microsoft.AspNetCore.Mvc;\nusing Microsoft.Extensions.Primitives;\nusing Newtonsoft.Json;\n\nprivate const string personalaccesstoken = \"&lt;your PAT>\";\nprivate const string organization = \"&lt;your org>\";\nprivate const string project = \"&lt;your project>\";\nprivate const int pipelineId = &lt;your pipeline Id>; \n\npublic static async Task&lt;IActionResult> Run([FromBody]HttpRequest req, ILogger log)\n{\n    log.LogInformation(\"C# HTTP trigger function processed a request.\");\n    string requestBody = await new StreamReader(req.Body).ReadToEndAsync();\n    dynamic data = JsonConvert.DeserializeObject(requestBody);\t\n\n    log.LogInformation($\"eventType: {data?.eventType}\");\n    log.LogInformation($\"message text: {data?.message?.text}\");\n    log.LogInformation($\"pullRequestId: {data?.resource?.pullRequestId}\");\n    log.LogInformation($\"sourceRefName: {data?.resource?.sourceRefName}\");\n\n    try\n\t{\n\t\tusing (HttpClient client = new HttpClient())\n\t\t{\n\t\t\tclient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue(\"application\/json\"));\n\t\t\tclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", ToBase64(personalaccesstoken));\n\n\t\t\tstring payload = @\"{ \n\t\t\"\"variables\"\": {\n\t\t\t\"\"System.PullRequest.SourceBranch\"\": {\n\t\t\t\t\"\"isSecret\"\": false,\n            \t\"\"value\"\": \"\"\" + data?.resource?.sourceRefName + @\"\"\"\n\t\t\t},\n\t\t\t\"\"System.PullRequest.PullRequestId\"\": {\n\t\t\t\t\"\"isSecret\"\": false,\n            \t\"\"value\"\": \"+ data?.resource?.pullRequestId + @\"\n\t\t\t}\n\t\t}\n\t}\";\n            var url = $\"https:\/\/dev.azure.com\/{organization}\/{project}\/_apis\/pipelines\/{pipelineId}\/runs?api-version=6.0-preview.1\";\n            log.LogInformation($\"sending payload: {payload}\");\n            log.LogInformation($\"api url: {url}\");\n\t\t\tusing (HttpResponseMessage response = await client.PostAsync(url, new StringContent(payload, Encoding.UTF8, \"application\/json\")))\n\t\t\t{\n\t\t\t\tresponse.EnsureSuccessStatusCode();\n\t\t\t\tstring responseBody = await response.Content.ReadAsStringAsync();\n                return new OkObjectResult(responseBody);\n\t\t\t}\n\t\t}\n\t}\n\tcatch (Exception ex)\n\t{\n\t\tlog.LogError(\"Error running pipeline\", ex.Message);\n        return new JsonResult(ex) { StatusCode = 500 }; \n\t}\n}\n\nprivate static string ToBase64(string input)\n{\n\treturn Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(string.Format(\"{0}:{1}\", \"\", input)));\n}<\/code><\/pre>\n<h2 class=\"wp-block-heading\">Service Hook<\/h2>\n<p>With all prep work done, all we have left to do is to connect PR merge event to Function call:<\/p>\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"777\" height=\"793\" src=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-13.png\" alt=\"Pipeline run showing successful PR environment deployment\" class=\"wp-image-978\" srcset=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-13.png 777w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-13-294x300.png 294w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-13-768x784.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n<\/div>\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"522\" height=\"638\" src=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-14.png\" alt=\"Azure portal showing staging environments for Static Web App\" class=\"wp-image-979\" srcset=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-14.png 522w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-14-245x300.png 245w\" sizes=\"auto, (max-width: 522px) 85vw, 522px\" \/><\/figure>\n<\/div>\n<\/div>\n<p>The function url should contain access key if that was defined. The easiest is probably to copy it straight from the Portal&#8217;s <code>Code + Test<\/code> blade:<\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"174\" src=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-15-1024x174.png\" alt=\"Pipeline close task configuration for PR environment cleanup\" class=\"wp-image-980\" srcset=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-15-1024x174.png 1024w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-15-300x51.png 300w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-15-768x131.png 768w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-15-1200x204.png 1200w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-15.png 1306w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n<p>It also may be a good idea to test connection on the second form before finishing up.<\/p>\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n<p>Once everything is connected, the pipelines should create\/delete staging environments similar to what GitHub does. One possible improvement we could potentially do, would be to replace branch policy with yet another Service Hook to Function so that PR title gets correctly reflected on the Portal. <\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"387\" src=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-16-1024x387.png\" alt=\"Successful cleanup of staging environment after PR merge\" class=\"wp-image-981\" srcset=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-16-1024x387.png 1024w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-16-300x113.png 300w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-16-768x290.png 768w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-16-1200x453.png 1200w, https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/09\/image-16.png 1313w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n<p>But I&#8217;ll leave it as a challenge for readers to complete.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last time we took a peek under the hood of Static Web Apps, we discovered a docker container that allowed us to do custom deployments. This however left us with an issue where we could create staging environments but could not quite call it a day as we could not cleanup after ourselves. There is &hellip; <a href=\"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":674,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[50],"tags":[48,54],"class_list":["post-914","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","tag-azure","tag-azure-swa"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline - Timur and associates<\/title>\n<meta name=\"description\" content=\"Previously we have attempted to get Azure DevOps Static Web Apps handling pipeline to feature parity with GitHub. Now is the time for complete pipeline!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline - Timur and associates\" \/>\n<meta property=\"og:description\" content=\"Previously we have attempted to get Azure DevOps Static Web Apps handling pipeline to feature parity with GitHub. Now is the time for complete pipeline!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/\" \/>\n<meta property=\"og:site_name\" content=\"Timur and associates\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-25T10:46:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-07T11:48:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/02\/cloud-computing-2001090_1920.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"396\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"timur\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TimurKh\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/\"},\"author\":{\"name\":\"timur\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#\\\/schema\\\/person\\\/34d0ed30d573b5bc317ea990bd2e0c59\"},\"headline\":\"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline\",\"datePublished\":\"2021-09-25T10:46:30+00:00\",\"dateModified\":\"2026-03-07T11:48:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/\"},\"wordCount\":518,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/cloud-computing-2001090_1920.jpg\",\"keywords\":[\"azure\",\"azure-swa\"],\"articleSection\":[\"Cloud\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/\",\"url\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/\",\"name\":\"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline - Timur and associates\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/cloud-computing-2001090_1920.jpg\",\"datePublished\":\"2021-09-25T10:46:30+00:00\",\"dateModified\":\"2026-03-07T11:48:40+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#\\\/schema\\\/person\\\/34d0ed30d573b5bc317ea990bd2e0c59\"},\"description\":\"Previously we have attempted to get Azure DevOps Static Web Apps handling pipeline to feature parity with GitHub. Now is the time for complete pipeline!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/cloud-computing-2001090_1920.jpg\",\"contentUrl\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/cloud-computing-2001090_1920.jpg\",\"width\":1500,\"height\":396,\"caption\":\"header image, cloud computing\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/09\\\/25\\\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#website\",\"url\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/\",\"name\":\"Timur and associates\",\"description\":\"Notes of an IT contractor\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#\\\/schema\\\/person\\\/34d0ed30d573b5bc317ea990bd2e0c59\",\"name\":\"timur\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg\",\"caption\":\"timur\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/TimurKh\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline - Timur and associates","description":"Previously we have attempted to get Azure DevOps Static Web Apps handling pipeline to feature parity with GitHub. Now is the time for complete pipeline!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/","og_locale":"en_US","og_type":"article","og_title":"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline - Timur and associates","og_description":"Previously we have attempted to get Azure DevOps Static Web Apps handling pipeline to feature parity with GitHub. Now is the time for complete pipeline!","og_url":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/","og_site_name":"Timur and associates","article_published_time":"2021-09-25T10:46:30+00:00","article_modified_time":"2026-03-07T11:48:40+00:00","og_image":[{"width":1500,"height":396,"url":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/02\/cloud-computing-2001090_1920.jpg","type":"image\/jpeg"}],"author":"timur","twitter_card":"summary_large_image","twitter_creator":"@TimurKh","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/#article","isPartOf":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/"},"author":{"name":"timur","@id":"https:\/\/blog.wiseowls.co.nz\/#\/schema\/person\/34d0ed30d573b5bc317ea990bd2e0c59"},"headline":"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline","datePublished":"2021-09-25T10:46:30+00:00","dateModified":"2026-03-07T11:48:40+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/"},"wordCount":518,"commentCount":0,"image":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/02\/cloud-computing-2001090_1920.jpg","keywords":["azure","azure-swa"],"articleSection":["Cloud"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/","url":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/","name":"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline - Timur and associates","isPartOf":{"@id":"https:\/\/blog.wiseowls.co.nz\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/#primaryimage"},"image":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/02\/cloud-computing-2001090_1920.jpg","datePublished":"2021-09-25T10:46:30+00:00","dateModified":"2026-03-07T11:48:40+00:00","author":{"@id":"https:\/\/blog.wiseowls.co.nz\/#\/schema\/person\/34d0ed30d573b5bc317ea990bd2e0c59"},"description":"Previously we have attempted to get Azure DevOps Static Web Apps handling pipeline to feature parity with GitHub. Now is the time for complete pipeline!","breadcrumb":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/#primaryimage","url":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/02\/cloud-computing-2001090_1920.jpg","contentUrl":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2021\/02\/cloud-computing-2001090_1920.jpg","width":1500,"height":396,"caption":"header image, cloud computing"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/09\/25\/azure-static-web-apps-adding-pr-support-to-azure-devops-pipeline\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.wiseowls.co.nz\/"},{"@type":"ListItem","position":2,"name":"Azure Static Web Apps \u2013 adding PR support to Azure DevOps pipeline"}]},{"@type":"WebSite","@id":"https:\/\/blog.wiseowls.co.nz\/#website","url":"https:\/\/blog.wiseowls.co.nz\/","name":"Timur and associates","description":"Notes of an IT contractor","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.wiseowls.co.nz\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.wiseowls.co.nz\/#\/schema\/person\/34d0ed30d573b5bc317ea990bd2e0c59","name":"timur","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg","caption":"timur"},"sameAs":["https:\/\/x.com\/TimurKh"]}]}},"_links":{"self":[{"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/posts\/914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/comments?post=914"}],"version-history":[{"count":10,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/posts\/914\/revisions"}],"predecessor-version":[{"id":1358,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/posts\/914\/revisions\/1358"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/media\/674"}],"wp:attachment":[{"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/media?parent=914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/categories?post=914"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/tags?post=914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}