Git for Windows Install Here (needed for dev sh script)
From src:
Commands:
layout
(l
): Run first time to create a full agent layout in {root}/{runtime_id}/_layout
build
(b
): build everything and update agent layout folder
test
(t
): build agent binaries, run unit tests applicable to the current platform
Normal dev flow:
git clone https://github.com/microsoft/azure-pipelines-agent
cd ./src
./dev.(sh/cmd) layout # the agent that build from source is in {root}/{runtime_id}/_layout
<make code changes>
./dev.(sh/cmd) build # {root}/{runtime_id}/_layout will get updated
./dev.(sh/cmd) test # run unit tests before git commit/push
The agent can be run in debug mode by providing the parameter --debug
to the run
command.
This will make the agent recognize the following environment variables:
VSTSAGENT_DEBUG_TASK
- for remote debugging node-based pipeline tasks
Note that all of these variables need to be defined on the node that is used to run the agent. Also, do not run production agents with this mode as it can cause pipelines to appear stuck.
When enabled, the agent will start the Node process with specific parameters. These parameters cause the process to wait for the debugger to attach before continuing with the execution of the pipeline task script. The value must be set to either:
- Task
id
, which is an unique GUID identifier to be found intask.json
definition of the task - Task
name
and majorversion
, e.g. AzureCLIV2
Only one task can be debugged at one time and all other tasks in the same pipeline will proceed as usual.
If you wish to stop debugging this task either restart that agent without --debug
option, or unset the variables from above.
Using Visual Studio 2017
Using Visual Studio Code
We use the dotnet foundation and CoreCLR style guidelines located here
'unzip' not found
- if you see this while building or testing on Windows, you need to install unzip for the Windows bash shell
- open a command window, run bash, and run
sudo apt install unzip
to get that tool installed