{"id":285,"date":"2019-07-31T19:41:51","date_gmt":"2019-07-31T19:41:51","guid":{"rendered":"http:\/\/yer.ac\/blog\/?p=285"},"modified":"2019-07-31T19:46:33","modified_gmt":"2019-07-31T19:46:33","slug":"setting-up-a-self-hosted-build-agent-for-azure-devops","status":"publish","type":"post","link":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/","title":{"rendered":"Setting up a self-hosted build agent for Azure DevOps"},"content":{"rendered":"\n<p>Azure DevOps has brilliant build pipeline options and as easy as it is to get set up with their hosted build agents, it can get quite costly rather quick. In this post I cover off setting up a self-hosted build agent for use with Azure.<\/p>\n\n\n\n<p>This post won&#8217;t cover setting up the build box, but can be covered in a later guide if required.  I actually have my build box scripted out using Choco commands to allow building of .NET projects to make this step easier.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Pros\/Cons<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Pro: Full control over the build<\/li><li>Pro: Can have your builds build items or run services which simply aren&#8217;t available in the Hosted agents.<\/li><li>Pro: Low cost. If you already have the hardware, why pay for Azure VMs?<\/li><li>Con: Maintenance and redundancy. If the machine goes down or breaks it blocks your pipeline.<\/li><li>Con: Extra setup steps. <\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before starting you will need to make sure:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You are a collection\/build admin<\/li><li>You have a server configured to build the appropriate software (i.e. Correct SDKs etc which won&#8217;t be covered in this post)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Personal Access Tokens<\/h2>\n\n\n\n<p>First of all, you will need a personal access token for your account. This is used to allow your build agent access to Azure without hard-coding your credentials into your build scripts. You can use your own account for this, or a specially created service account &#8211; Just note it will need permissions to access the collections it will be building.<\/p>\n\n\n\n<p>To get this, log in to your Azure Devops portal, and navigate to your security page.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"467\" height=\"231\" data-attachment-id=\"286\" data-permalink=\"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/image-22\/\" data-orig-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png?fit=467%2C231&amp;ssl=1\" data-orig-size=\"467,231\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png?fit=467%2C231&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png?resize=467%2C231\" alt=\"\" class=\"wp-image-286\" srcset=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png?w=467&amp;ssl=1 467w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png?resize=300%2C148&amp;ssl=1 300w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/figure>\n\n\n\n<p>In here, select &#8220;Personal Access Tokens&#8221; and then &#8220;New&#8221;. A panel will be displayed to configure this PAT. Specify a friendly and unique name, select the organisation you are using this token for, and then set its security access.<\/p>\n\n\n\n<p>For the security access, I recommend selecting <strong>Full Access<\/strong> under &#8220;Scopes&#8221; so you can use this PAT for general Dev Ops activities. You can fine-tune the control, but you must ensure it has read\/execute on the build scope as an absolute minimum. For expiry I typically select the longest period which is 1 year.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"657\" height=\"399\" data-attachment-id=\"288\" data-permalink=\"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/image-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-1.png?fit=657%2C399&amp;ssl=1\" data-orig-size=\"657,399\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-1.png?fit=657%2C399&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-1.png?resize=657%2C399\" alt=\"\" class=\"wp-image-288\" srcset=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-1.png?w=657&amp;ssl=1 657w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-1.png?resize=300%2C182&amp;ssl=1 300w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Agent download and configuration<\/h2>\n\n\n\n<p>Next up you will need to navigate to the project settings > Pipelines > Agent Pools.<\/p>\n\n\n\n<p>Create a new Agent Pool with an appropriate name (You don&#8217;t *have* to do this and can just use the default pool if you wish, but I like the separation). When your pool is created you will see the option to add a new agent to it.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"629\" height=\"104\" data-attachment-id=\"291\" data-permalink=\"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/image-2-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-2.png?fit=629%2C104&amp;ssl=1\" data-orig-size=\"629,104\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-2.png?fit=629%2C104&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-2.png?resize=629%2C104\" alt=\"\" class=\"wp-image-291\" srcset=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-2.png?w=629&amp;ssl=1 629w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-2.png?resize=300%2C50&amp;ssl=1 300w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><figcaption><br><\/figcaption><\/figure>\n\n\n\n<p>Clicking &#8220;New Agent&#8221; will give you the instructions for the OS of your choice. As per the instructions, download the agent (A ~130 ZIP file) and then place somewhere sensible on the machine that will be acting as a build server. When extracted, run config.cmd <strong>in an elevated command window<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"792\" data-attachment-id=\"292\" data-permalink=\"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/image-3-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-3.png?fit=801%2C792&amp;ssl=1\" data-orig-size=\"801,792\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-3.png?fit=700%2C692&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-3.png?fit=700%2C692\" alt=\"\" class=\"wp-image-292\" srcset=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-3.png?w=801&amp;ssl=1 801w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-3.png?resize=300%2C297&amp;ssl=1 300w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-3.png?resize=768%2C759&amp;ssl=1 768w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-3.png?resize=700%2C692&amp;ssl=1 700w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><\/figure>\n\n\n\n<p>When running the config.cmd command you will require the following information:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Server URL<ul><li>This will be https:\/\/dev.azure.com\/{organisation name}<\/li><\/ul><\/li><li>What type of authentication you will use (Just press return as it will default to PAT)<\/li><li>Your PAT to access the server, as set up in the first step.<\/li><li>The Pool to connect to. This will be the name of the agent pool created above.<\/li><li>The working folder. The folder to use for storing workspaces being built.<\/li><li>A name for this agent. Call it whatever you want, but I would personally always include the machine name as it makes it easier to work out which agents are running. <\/li><\/ul>\n\n\n\n<p>Providing all the above settings are specified correctly and there are no authentication issues, it should now attempt to start. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Confirming the agent is active<\/h2>\n\n\n\n<p>Going back to the Agent Pools configuration screen you should now see the agent listed in the appropriate agent pool. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"226\" data-attachment-id=\"296\" data-permalink=\"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/image-4-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-4.png?fit=650%2C226&amp;ssl=1\" data-orig-size=\"650,226\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-4.png?fit=650%2C226&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-4.png?resize=650%2C226\" alt=\"\" class=\"wp-image-296\" srcset=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-4.png?w=650&amp;ssl=1 650w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image-4.png?resize=300%2C104&amp;ssl=1 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/figure>\n\n\n\n<p>If the agent is not displaying after a few minutes, something went wrong in setup. <\/p>\n\n\n\n<p>If the agent is displaying offline, try running the &#8220;run.cmd&#8221; command in an elevated command window on your build server.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Now all you have to do is select your new agent pool when creating your next build!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Azure DevOps has brilliant build pipeline options and as easy as it is to get set up with their hosted build agents, it can get quite costly rather quick. In this post I cover off setting up a self-hosted build agent for use with Azure. This post won&#8217;t cover setting up the build box, but &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[19,7],"tags":[20,2],"class_list":["post-285","post","type-post","status-publish","format-standard","hentry","category-azure","category-devops","tag-azure","tag-devops"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Setting up a self-hosted build agent for Azure DevOps - yer.ac | Adventures of a developer, and other things.<\/title>\n<meta name=\"description\" content=\"Setting up your own self-hosted build agent for Azure DevOps build 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:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting up a self-hosted build agent for Azure DevOps - yer.ac | Adventures of a developer, and other things.\" \/>\n<meta property=\"og:description\" content=\"Setting up your own self-hosted build agent for Azure DevOps build pipeline.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/\" \/>\n<meta property=\"og:site_name\" content=\"yer.ac | Adventures of a developer, and other things.\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-31T19:41:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-31T19:46:33+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png\" \/>\n<meta name=\"author\" content=\"yer.ac\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yer.ac\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/\"},\"author\":{\"name\":\"yer.ac\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"headline\":\"Setting up a self-hosted build agent for Azure DevOps\",\"datePublished\":\"2019-07-31T19:41:51+00:00\",\"dateModified\":\"2019-07-31T19:46:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/\"},\"wordCount\":692,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"image\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/image.png\",\"keywords\":[\"Azure\",\"DevOps\"],\"articleSection\":[\"Azure\",\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/\",\"name\":\"Setting up a self-hosted build agent for Azure DevOps - yer.ac | Adventures of a developer, and other things.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/image.png\",\"datePublished\":\"2019-07-31T19:41:51+00:00\",\"dateModified\":\"2019-07-31T19:46:33+00:00\",\"description\":\"Setting up your own self-hosted build agent for Azure DevOps build pipeline.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/image.png?fit=467%2C231&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/image.png?fit=467%2C231&ssl=1\",\"width\":467,\"height\":231},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/07\\\/31\\\/setting-up-a-self-hosted-build-agent-for-azure-devops\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting up a self-hosted build agent for Azure DevOps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\",\"name\":\"yer.ac | Adventures of a developer, and other things.\",\"description\":\"Blog to keep track of things I am upto\",\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/yer.ac\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\",\"name\":\"yer.ac\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"caption\":\"yer.ac\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting up a self-hosted build agent for Azure DevOps - yer.ac | Adventures of a developer, and other things.","description":"Setting up your own self-hosted build agent for Azure DevOps build 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:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/","og_locale":"en_US","og_type":"article","og_title":"Setting up a self-hosted build agent for Azure DevOps - yer.ac | Adventures of a developer, and other things.","og_description":"Setting up your own self-hosted build agent for Azure DevOps build pipeline.","og_url":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/","og_site_name":"yer.ac | Adventures of a developer, and other things.","article_published_time":"2019-07-31T19:41:51+00:00","article_modified_time":"2019-07-31T19:46:33+00:00","og_image":[{"url":"http:\/\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png","type":"","width":"","height":""}],"author":"yer.ac","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yer.ac","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/#article","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/"},"author":{"name":"yer.ac","@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"headline":"Setting up a self-hosted build agent for Azure DevOps","datePublished":"2019-07-31T19:41:51+00:00","dateModified":"2019-07-31T19:46:33+00:00","mainEntityOfPage":{"@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/"},"wordCount":692,"commentCount":0,"publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"image":{"@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/#primaryimage"},"thumbnailUrl":"http:\/\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png","keywords":["Azure","DevOps"],"articleSection":["Azure","DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/","url":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/","name":"Setting up a self-hosted build agent for Azure DevOps - yer.ac | Adventures of a developer, and other things.","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/#primaryimage"},"image":{"@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/#primaryimage"},"thumbnailUrl":"http:\/\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png","datePublished":"2019-07-31T19:41:51+00:00","dateModified":"2019-07-31T19:46:33+00:00","description":"Setting up your own self-hosted build agent for Azure DevOps build pipeline.","breadcrumb":{"@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/#primaryimage","url":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png?fit=467%2C231&ssl=1","contentUrl":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/07\/image.png?fit=467%2C231&ssl=1","width":467,"height":231},{"@type":"BreadcrumbList","@id":"https:\/\/yer.ac\/blog\/2019\/07\/31\/setting-up-a-self-hosted-build-agent-for-azure-devops\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/yer.ac\/blog\/"},{"@type":"ListItem","position":2,"name":"Setting up a self-hosted build agent for Azure DevOps"}]},{"@type":"WebSite","@id":"https:\/\/yer.ac\/blog\/#website","url":"https:\/\/yer.ac\/blog\/","name":"yer.ac | Adventures of a developer, and other things.","description":"Blog to keep track of things I am upto","publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yer.ac\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d","name":"yer.ac","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","caption":"yer.ac"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paP5IW-4B","jetpack-related-posts":[{"id":521,"url":"https:\/\/yer.ac\/blog\/2021\/10\/06\/vs2019-2022-keeps-asking-for-azure-devops-credentials-on-build\/","url_meta":{"origin":285,"position":0},"title":"VS2019 (+2022) keeps asking for Azure Devops Credentials on build","author":"yer.ac","date":"October 6, 2021","format":false,"excerpt":"We run our own nuget feed via Azure, and despite the user that's logged into VS is authenticated users are constantly asked to provide their credentials again when package restore is happening. A quick fix below - Mostly so I don't forget or can forward this to others later. Verify\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/yer.ac\/blog\/category\/development\/azure\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/10\/image-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/10\/image-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/10\/image-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/10\/image-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":436,"url":"https:\/\/yer.ac\/blog\/2021\/03\/10\/moving-local-workspaces-between-users-vs2019-tfs-self-hosted-azure-devops\/","url_meta":{"origin":285,"position":1},"title":"Moving local workspaces between users VS2019\/TFS [Self Hosted\/ Azure Devops]","author":"yer.ac","date":"March 10, 2021","format":false,"excerpt":"Whilst I use GIT for most my source control these days, I still have some projects in TFSVC. On a recent switch of Visual Studio accounts I temporarily lost access to my mapped workspaces as these are linked to the VS logged in user, rather than to the machine. This\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/yer.ac\/blog\/category\/devops\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/03\/image-5.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/03\/image-5.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/03\/image-5.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":315,"url":"https:\/\/yer.ac\/blog\/2019\/10\/16\/ensuring-dotnet-test-trx-coverage-files-end-up-in-sonarqube\/","url_meta":{"origin":285,"position":2},"title":"Ensuring &#8220;dotnet test&#8221; TRX &#038; Coverage files end up in SonarQube","author":"yer.ac","date":"October 16, 2019","format":false,"excerpt":"I have written before about using SonarQube to do static analysis, but one issue I never came back to was ensuring that code coverage files generated via a build pipeline end up being picked up by the Sonar Scanner to assess code coverage. Note that the following I am actually\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/yer.ac\/blog\/category\/devops\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/10\/image.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":112,"url":"https:\/\/yer.ac\/blog\/2019\/05\/29\/remote-nlog-logging-with-azure-functions-part-one\/","url_meta":{"origin":285,"position":3},"title":"Remote NLOG logging with Azure Functions (Part one).","author":"yer.ac","date":"May 29, 2019","format":false,"excerpt":"Part of a journey I was on today to learn about Azure Functions and Cosmos DB. The final code for the Azure Functions element can be found on https:\/\/github.com\/Wabbbit\/AzLog Part one: Setup, Creating my first function, forwarding NLOG events and deploying to Azure within VS Code.Part two: persisting the incoming\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/yer.ac\/blog\/category\/development\/azure\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-4.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":151,"url":"https:\/\/yer.ac\/blog\/2019\/05\/29\/remote-nlog-logging-with-azure-functions-part-two-persisting-data-into-azure-cosmos-db\/","url_meta":{"origin":285,"position":4},"title":"Remote NLOG logging with Azure Functions (Part two) &#8211; Persisting data into Azure Cosmos DB.","author":"yer.ac","date":"May 29, 2019","format":false,"excerpt":"Last time, I got a very basic C# Azure Function hooked up to accept a request from an NLOG web service target. This time, I will be attempting to persist(insert) the incoming log information into an Azure Cosmos database container, direct from my Azure Function in VS Code. Disclaimer: This\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/yer.ac\/blog\/category\/development\/azure\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-12.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-12.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-12.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-12.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/05\/image-12.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":8,"url":"https:\/\/yer.ac\/blog\/2019\/03\/19\/my-attempt-at-using-sonarqube-for-static-code-analysis\/","url_meta":{"origin":285,"position":5},"title":"My attempt at using SonarQube for static code analysis","author":"yer.ac","date":"March 19, 2019","format":false,"excerpt":"This post covers my attempts to use SonarQube as a stand-alone install to perform static code analysis on a regular basis. This will cover purely getting the tool working, Maybe I will pick up how I can use the data in a later post? I will be doing this in\u2026","rel":"","context":"In &quot;Development&quot;","block_context":{"text":"Development","link":"https:\/\/yer.ac\/blog\/category\/development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image.png?resize=1050%2C600&ssl=1 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":10,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/285\/revisions"}],"predecessor-version":[{"id":300,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/285\/revisions\/300"}],"wp:attachment":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/categories?post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/tags?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}