/BuildMonitor

Dashboard to display the status of your builds from your build server (e.g. TeamCity)

Primary LanguageC#MIT LicenseMIT

Build Monitor Dashboard

Dashboard to display the status of your builds from your build server (e.g. TeamCity).

Build Status

NOTE: This is a work in progress, breaking changes may come at any time!

Screenshot

Build Monitor Screenshot

Features

The dashboard is optimized to display the results of multiple build configurations with the following features:

  • Multiple dashboards with unique URLs
  • Build configuration name
  • Default branch or a pre-selected branch
  • The name of the user with the last change on the branch
  • Automatic refresh with a 15 seconds interval
  • Groups (shown as "Eclipse", "Storybook" and "EasyHTTP" in the screenshot above)

Technology highlights

  • ASP.NET Core 2.1 backend targeting the full .NET Framework (required by a referenced 3rd-party component).
    • Dependency injection for clear dependencies and testability + unit tests.
      • Random test data generation with Bogus.
    • Static code analysis with Microsoft Code Analysis (aka. FxCop).
    • Enforced coding standards with StyleCop.
    • Configuration read from environment variables and JSON. (Read more: The Twelve-Factor App: III. Config)
      • Automatic configuration reloading with the Options pattern.
      • Configuration value validation with data annotations.
    • All assemblies are strong-named.
      • Signing third-party open-source assemblies with StrongNamer.
    • Enforcing HTTPS and HSTS by default.
    • Moment-like date formatting with Humanizer.
    • Accessing the TeamCity REST API with TeamCitySharp.
  • Angular 6 Single Page Application frontend implemented in TypeScript.
    • Server-side rendering.
    • Static code analysis with TSLint.
    • Customized Angular Material design implemented in SCSS, with the layout based on cards.
    • Polling the backend with RxJS Observables.
    • Enforced coding standards with .editorconfig.
    • Human-friendly date formatting with Moment pipe.
  • Continuous Integration (CI) with Azure DevOps.
    • Build pipeline implemented in azure-pipelines.yml.
      • Build includes both backend and frontend unit tests.
      • Build includes static code analysis.
    • Release pipeline to Azure AppService.

Architecture

This solution follows the Clean Architecture recommended for ASP.NET Core applications. Read more:

Clean Architecture

The Domain Layer contains all entities, enums, exceptions, types and logic specific to the domain.

The Application Layer contains all application logic. It is dependent on the Domain layer, but has no dependencies on any other layer or project. This layer defines interfaces that are implemented by outside layers. For example the IBuildService interface is defined in the Application layer and imlemented by the TeamCityBuildService in the Infrastructure layer.

The Persistence Layer contains all implementation required to load and store the data for the application, including the configuration.

The Infrastructure Layer contains classes for accessing external resources such as file systems, web services, SMTP, etc. These classes are implementing the interfaces defined within the Application layer.

The Presentation Layer contains all the user interface logic, in this case both the backend and the browser part.

The layers are implemented in separate projects to ensure correct separation of concerns and clear dependencies, even if this is a basic application and everything could be implemented in a single project, which would speed up the build process.

Installation

Set the following environment variables to specify the connection to your build server:

  • BUILDMONITOR__HOST, e.g. server.example.com:8080
  • BUILDMONITOR__USERNAME, e.g. myuser
  • BUILDMONITOR__PASSWORD, e.g. mypassword

Got feedback?

Your feedback is more than welcome, please send your suggestions, feature requests or bug reports as Github issues.

Contributing guidelines

Contributions of all kinds are welcome, please feel free to send Pull Requests. As they are requirements of successful build all code analyzers and tests MUST pass, and also please make sure you have a reasonable code coverage for new code.

Thanks for your help in making this project better!

Acknowledgements

Thanks to Jason Taylor for the Clean Architecture diagram.

About the author

This project is created and maintaned by György Balássy.