All Projects → JetBrains → TeamCity.ServiceMessages

JetBrains / TeamCity.ServiceMessages

Licence: Apache-2.0 license
.NET library to deal with TeamCity Service messages

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to TeamCity.ServiceMessages

teamcity-google-agent
TeamCity support for Google cloud build agents
Stars: ✭ 13 (-69.05%)
Mutual labels:  teamcity
teamcity-s3-artifact-storage-plugin
TeamCity plugin which allows replacing the TeamCity built-in artifacts storage with AWS S3
Stars: ✭ 39 (-7.14%)
Mutual labels:  teamcity
Just Another Android App
An Android base app with loads of cool libraries/configuration NOT MAINTAINED
Stars: ✭ 1,654 (+3838.1%)
Mutual labels:  teamcity
teamcity-hashicorp-vault-plugin
TeamCity plugin to support HashiCorp Vault
Stars: ✭ 23 (-45.24%)
Mutual labels:  teamcity
teamcity-commit-hooks
Plugin for TeamCity simplifying installation of webhooks for repositories in GitHub and GitHub Enterprise.
Stars: ✭ 24 (-42.86%)
Mutual labels:  teamcity
tc-radiate
Build radiator for TeamCity - GitHub hosted, Standalone HTML+JS
Stars: ✭ 15 (-64.29%)
Mutual labels:  teamcity
koshry
Run on CI, Apply Rules on the Build and Get the Result back to the Pull Request.
Stars: ✭ 59 (+40.48%)
Mutual labels:  teamcity
teamcity-rust-plugin
TeamCity Rust and Cargo plugin
Stars: ✭ 29 (-30.95%)
Mutual labels:  teamcity
newman-reporter-teamcity
A newman reporter for TeamCity.
Stars: ✭ 19 (-54.76%)
Mutual labels:  teamcity
teamcity-deployer-plugin
Deployer plugin for TeamCity CI server
Stars: ✭ 37 (-11.9%)
Mutual labels:  teamcity
teamcity-symbol-server
TeamCity Symbol Server plugin
Stars: ✭ 16 (-61.9%)
Mutual labels:  teamcity
teamcity
dohq-teamcity is a Python package providing access to the JetBrains TeamCity server API.
Stars: ✭ 24 (-42.86%)
Mutual labels:  teamcity
teamcity-msbuild-logger
MSBuild logger for TeamCity
Stars: ✭ 16 (-61.9%)
Mutual labels:  teamcity
teamcity-settings
Example project using TeamCity's Versioned Settings and Kotlin DSL
Stars: ✭ 20 (-52.38%)
Mutual labels:  teamcity
teamcity-docker-compose
Compose to create working TeamCity server with PostgreSQL and Agents
Stars: ✭ 97 (+130.95%)
Mutual labels:  teamcity
teamcity-kubernetes-plugin
Run TeamCity cloud agents on Kubernetes cluster
Stars: ✭ 57 (+35.71%)
Mutual labels:  teamcity
go-teamcity
Golang client for TeamCity REST API
Stars: ✭ 32 (-23.81%)
Mutual labels:  teamcity
DBTestCompare
Application to compare results of two SQL queries
Stars: ✭ 15 (-64.29%)
Mutual labels:  teamcity
teamcity-azure-storage
TeamCity Azure artifacts storage support plugin
Stars: ✭ 14 (-66.67%)
Mutual labels:  teamcity
AnyStatus
A remote control for your CI/CD pipelines and more
Stars: ✭ 38 (-9.52%)
Mutual labels:  teamcity

Service Messages .NET library for

NuGet TeamCity.Dotnet.Integration License

This library provides read/write access to TeamCity Service messages. Take a look at the description of service messages at this page.

Usage:

Most use cases are covered in tests.

To create service message, use:

JetBrains.TeamCity.ServiceMessages.Write.ServiceMessageFormatter.FormatMessage

To parse service messages, use:

JetBrains.TeamCity.ServiceMessages.Read.ServiceMessageParser.ParseServiceMessages

There is an API to generate TeamCity specific service messages, use:

JetBrains.TeamCity.ServiceMessages.Write.Special.ITeamCityWriter

to get the instance of the object create an instance of the factory and get it by:

new JetBrains.TeamCity.ServiceMessages.Write.Special.TeamCityServiceMessages().CreateWriter()

for example:

// Creating the root writer
using (var writer = new TeamCityServiceMessages().CreateWriter(Console.WriteLine))
// Creating the build log block "Tests"
using (var block = writer.OpenBlock("Tests"))
// Creating the test suite "Tests"
using (var testClass = block.OpenTestSuite("TestClass"))
{
    // Creating the successful test
    using (var test = testClass.OpenTest("Successful"))
    {
        test.WriteStdOutput("Some output");
        test.WriteDuration(TimeSpan.FromSeconds(1));
    }

    // Creating the ignored test
    using (var test = testClass.OpenTest("Ignored"))
    {
        test.WriteIgnored();
    }

    // Creating the failed test
    using (var test = testClass.OpenTest("Failed"))
    {
        test.WriteFailed("Some message", "Details");
    }

    // Attaching an image to test
    using (var test = testClass.OpenTest("Image"))
    {
        writer.PublishArtifact(Path.GetFullPath("TeamCity.png") + " => TestData");
        test.WriteImage("TestData/TeamCity.png", "Team City Logo");
    }

    // Attaching a value to test
    using (var test = testClass.OpenTest("Value"))
    {
        test.WriteValue(1234.56.ToString(CultureInfo.InvariantCulture), "Some Value");
    }

    // Attaching a file to test
    using (var test = testClass.OpenTest("File"))
    {
        writer.PublishArtifact(Path.GetFullPath("TeamCity.png") + " => TestData");
        test.WriteFile("TestData/TeamCity.png", "Team City Logo file");
    }

    // Attaching a link to test
    using (var test = testClass.OpenTest("Link"))
    {
        test.WriteLink("https://www.jetbrains.com/", "JetBrains");
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].