JenkinsAsService

Summary

A .NET 10 Windows Service that runs a Jenkins Agent (JNLP/inbound) natively. Includes an event-driven watchdog with auto-recovery, secret protection (DPAPI/CredMgr/EnvVar), structured logging with Serilog, ETag-based jar caching, and optional OpenTelemetry metrics. Eliminates the need for manual agent startup, login sessions, or scheduled tasks.

Documentation

Quick Facts

Property Value
Runtime .NET 10 (net10.0-windows)
Key Features Event-driven watchdog, ETag jar caching, secret protection (DPAPI/CredMgr/EnvVar), OpenTelemetry (opt-in), HTTP resilience (Polly), secret redaction, CLEF JSON logging
Build Deterministic, locked NuGet restore, R2R, compressed single-file, embedded PDB
Logging Serilog rolling file + Windows Event Log, enriched with ProcessId, MachineName, EnvironmentName
Config appsettings.json — Jenkins section + optional Telemetry section
Testing 59 unit tests (xUnit + NSubstitute + FluentAssertions)
CI/CD Build + test, 6 security scans (CodeQL, Semgrep, Gitleaks, PSScriptAnalyzer, Dependency Review, Trivy), dual-arch release (x64 + x86) with checksums
License BSD 3-Clause
Install Path C:\Program Files\Jenkins
Community Files CONTRIBUTING.md, CODE_OF_CONDUCT.md (Contributor Covenant v2.0), Security.md
Badges Self-hosted SVGs (misc/badges/) for license, .NET, platform; Shields.io for dynamic release tag