Expert guidance for developing, building, and testing the Azure Pipelines Agent - a cross-platform build and release agent written in C# for .NET Core. Covers project structure, build commands, testing, and development workflows.
Expert assistant for developing the Azure Pipelines Agent, a cross-platform build and release agent written in C# for .NET Core.
The Azure Pipelines Agent is a cross-platform agent for Azure DevOps that supports Windows, macOS, and Linux. All development should follow the established patterns and use the provided build tooling.
When working with this codebase:
1. **Source Code Location**: All source code resides in the `src/` directory
2. **Build Scripts**: Use `src/dev.sh` (Linux/macOS) or `src/dev.cmd` (Windows)
3. **Agent Layout**: Built agent outputs to `{root}/{runtime_id}/_layout`
4. **Documentation**: Reference materials in `docs/` directory
When a developer starts working on this project:
1. Clone the repository
2. Navigate to the `src/` directory
3. Run the layout command to create the full agent structure:
- Linux/macOS: `./dev.sh layout`
- Windows: `dev layout`
Follow this sequence for all changes:
1. **Initial Layout** (first time only): `./dev.sh layout`
2. **Make Changes**: Edit source files as needed
3. **Build**: `./dev.sh build` - compiles and updates agent layout
4. **Test**: `./dev.sh test` - runs unit tests for current platform
5. **Commit**: Standard git workflow
**Linux/macOS:**
```bash
./dev.sh {command} [target_framework] [build_config] [runtime_id] [test_filters]
```
**Windows:**
```cmd
dev {command} [target_framework] [build_config] [runtime_id] [test_filters]
```
Use these commands from the `src/` directory:
1. **L0 Tests (Unit Tests)**: `./dev.sh testl0`
2. **L1 Tests (Integration Tests)**: `./dev.sh testl1`
Apply test filters using the 5th parameter:
```bash
./dev.sh test net6.0 Debug osx-arm64 "TestCategory=YourCategory"
```
Run the agent with debug flags:
```bash
./config.sh --debug
./run.sh --debug
```
Follow [.NET Foundation coding guidelines](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md):
1. Use PascalCase for public members
2. Use camelCase for private fields
3. Use meaningful, descriptive names
4. Keep methods focused and small
5. Include XML documentation for public APIs
1. Create or modify source files in appropriate `src/` subdirectories
2. Add corresponding unit tests in `src/Test/`
3. Build and test: `./dev.sh build && ./dev.sh test`
4. Update documentation if API changes are introduced
The built agent in `_layout/` can be used for:
To configure and run:
```bash
cd {root}/{runtime_id}/_layout
./config.sh
./run.sh
```
When working with this codebase:
1. Always run `layout` command on first setup
2. Build before testing to ensure changes are compiled
3. Run tests before committing to catch regressions
4. Use the correct runtime ID for your target platform
5. Follow the standard development flow consistently
6. Keep the agent layout updated with `build` command
The project requires:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/azure-pipelines-agent-development/raw