Self-hosted Windows agents

  1. Before hosting, prepare the execution environment: third-party builder environment preparation****

  2. If your windows build requires you to start the UI program in the pipeline(e.g. open a browser for automated testing), see windows agent Startup Solution).

  3. agent resources are isolated by project. If multiple projects are imported to a third-party builder, import the agent in different projects and install the agent in different directories. (The installation package/installation script for each agent is different)

Get the Agent package in BKCI

According to Host your build to BKCI Guide, select Windows, download the Agent package

Create the agent installation directory on the Windows builder

new-item C:\data\landun -itemtype directory

Decompress and install agent

Decompress the downloaded Agent package to the folder created in the previous step

The above operation installs the agent as a system service, and the startup user of the service is the built-in windows user system. In order to read the user environment variables and user directory information during the pipeline process, need to change the system service startup user to the login user.

Execute the command services.msc to open the windows service management interface, find the service devops_agent_{agent_id} (each agent_id is different, the value of agent_id can be found in the configuration file .agent.properties)

Right-click-> Properties and select this account under the login tab

If it's a builder that's in the domain, the account name should be domain\username, e.g. tencent\xxx; if it's a builder that's not in the domain, the account name should be .\username, e.g. .\admin, .\administrator, .\bkci

Check the status

Open the task Manager, and check whether the devopsDaemon.exe and devopsAgent.exe processes exist, and check whether the startup user name of the two processes is the current login user

Page import

Click the 'Refresh' button on the build import page and you can see that the agent status changes to 'normal'

Last updated