Auto start build agent in interactive mode

http://donovanbrown.com/post/auto-start-build-agent-in-interactive-mode

Problem:

I need my build agent to auto login and start in interactive mode.

Solution:

Enable Windows auto login and add a shortcut to the startup folder.

Explanation:

I run Coded UI and Selenium UI test using my build agent. To do so the agent must be run in interactive mode. However, if you configure your agent to run interactive, it will not restart automatically after a reboot. If your system is configured to automatically install updates, your server may get rebooted without you knowing and prevent your agent from starting.

To solve this you can configure Windows to automatically log in a user and start the agent in interactive mode for you. To begin we need to enable automatic log in.

  1. Press Windows Key + R to open the Run dialog
  2. Type in the following and press enter:
    control userpasswords2
  3. Uncheck the box for User must enter a user name and password to use this computer.
  4. Click the Apply button
    You will be prompted by an Automatically sign in dialog
  5. Enter the password for the user
  6. Click OK
  7. Click OK on the Users Accounts dialog

Now every time your machine is rebooted the configured user will automatically login to the machine.

Now we need to make sure that once the user is logged in that our agent starts in interactive mode. To do this we are going to create a shortcut that will start our agent then simply place that shortcut in the startup folder for Windows.

  1. Right-click the desktop
  2. Select New / Shortcut
  3. Enter cmd
  4. Click Next
  5. Change the name to Start Agent
  6. Click Finish
  7. Right-click on the new shortcut
  8. Select Properties
  9. Append /c {pathToVsoagent.exe} to the target
    If you installed your agent to C:\Agent, your target should look like this: C:\Windows\System32\cmd.exe /c c:\agent\agent\vsoagent.exe
  10. Click OK

If you double click the shortcut, your agent will start in interactive mode. Now we need to copy this shortcut into the startup folder for Windows. This will ensure that each time we login the agent is started.

  1. Press Windows Key + R to open the Run dialog
  2. Type in the following
    shell:startup
  3. Click OK
    This will open the Startup folder in Windows Explorer.
  4. Drag and drop the shortcut to this folder

Now whenever your machine is restarted your agents will start up in interactive mode.

时间: 2024-08-30 03:48:10

Auto start build agent in interactive mode的相关文章

搭建TFS 2015 Build Agent环境(一)

Download the build agent Downloading the build agent is really simple. Navigate to your TFS control panel, click on Agent pools and then Download agent. This post will assume you have setup your agent pool already but that's as simple as click New po

TFS 2015 Build Agent failing syncing the repository 获取源码 不全 失败

当我们使用TFS2015d的生成代理时,我们将生成定义加入代理池队列中,但是代理可能无法完全下载我们在TFS代码浏览器中看到的所有目录,这肯定会导致编译失败呀!为什么呢? 原因在于tfscompile这个账号在某个项目的版本控制中,对某个源码目录没有权限 但是不可能啊,我们已经在根节点上给了权限了呀, 是的,你的确给了根目录所有权限,但是仔细观察你会发现,有个关于继承的隐藏开关 如果某个目录勾选了“关闭”,那么这个目录对TFSCOMPILE账号就无权访问,当然生成代理就无法下载咯. 因此,我们还

搭建TFS 2015 Build Agent环境(三)

在配置时,一定要注意下面的几个地方: 1.项目集合生成服务账号 中一定要包含: 2.Build Agent机器上防止Agent的路径一定要短,不要出现特殊字符,比如:C:\Agent 3.一定要安装VS2015之后,在执行Agent的config.否则会提示找不到MSBuild和VS的. 4.如果上不步骤执行还不行.请执行 configureAgent.cmd remove执行后,重新注册服务并启动.一定要确保agent是在线的.

搭建TFS 2015 Build Agent环境(二)

在执行和安装配置的过程中,注意一定要使用管理员权限运行:ConfigureAgent.cmd 和RunAgent.cmd.配置的过程中,要注意几个内容:1.TFS地址不要写DefaultCollection信息,只写到tfs即可.比如:http://xxx:8080/tfs. 2.在输入PoolName时,一定要确保是已经存在的PoolName.可以从下图中的位置确认. 3.执行完配置后,如果发现代理没有注册成功,建议不要折腾了.从下面地址下载新的版本吧. https://github.com/

Vs2017 xaramin mac build agent部署后记

? 换了四种黑苹果,最终成功了 ? 步骤: 1.升级vs2017, 2.安装XCODE 8.3 3.安装vs2017 for mac 企业版 4.启动vs2017 for mac ,设置xcode 位置 ? 5.打开远程登录与屏幕共享 ? 6.打开WINDOWS中的VS2017,在 选项中设置XCODE位置,使用IP连接MAC ? 7.建立APP,启动调试 ? ? ?

Deploy an agent on Windows

https://www.visualstudio.com/zh-cn/docs/build/actions/agents/v2-windows Last Update: 6/27/2017 In this article Learn about agents Check prerequisites Prepare permissions Decide which user you'll use Confirm the user has permission Download and config

TeamCity : Build 版本控制系统配置

VCS (版本控制系统) 是用来跟踪项目源文件版本变化的系统.它还有其它的名字,比如 SCM(源代码管理).当前 TeamCity 内置支持的 VCS 类型有:Git, Subversion, Mercurial, Perforce, Team Foundation Server, CVS, StarTeam, ClearCase, SourceGear Vault, Visual SourceSafe. 本文将通过实例比较详细的介绍 Build 中版本控制系统的设置. VCS root 一个

TeamCity : Build 基本配置

在 TeamCity 中创建了一个项目 HelloApp,并在这个项目中创建了一个名为 HelloAppDailyBuild 的Build 用来编译 demo 程序.本文我们将详细介绍 Build 中的基本配置.下图是 Build 基本配置的概览: Name Build 配置的名称. Build configuration ID Build configuration ID: 在系统中标识该 Build 配置,自动生成的规则是:项目名称 +下划线 + build 配置名称.比如要导航到一个 bu

TeamCity : 配置 Build 过程

Build 过程往往是比较复杂的,因此 TeamCtiy 通过 build 步骤的方式让您可以实现不同的应用场景.您可以在每个 build 步骤中只做一件事情,然后把一系列的 build 步骤组织起来按顺序执行来完成 build 过程.先看一下 build 步骤配置的概览: 每一个 Build 步骤都会对应一个 build runner 在背后完成真正的工作.我们要做的就是构思好 build 的过程,然后通过一系列的 build 步骤去实现它.在 build 的过程中,这些 build 步骤会被