Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for adding messages to the AppVeyor build log #1102

Closed
Philo opened this issue Jul 22, 2016 · 1 comment
Closed

Add support for adding messages to the AppVeyor build log #1102

Philo opened this issue Jul 22, 2016 · 1 comment
Labels
Milestone

Comments

@Philo
Copy link
Contributor

Philo commented Jul 22, 2016

Add the ability to send messages to the AppVeyor build log via the:

appveyor AddMessage command.

This could then be used to push specific messages (info, warning and error) to the separate AppVeyor messages tab for a build.

I would like to be able to combine this with the TaskSetup and TaskTeardown methods to log build script progress:

TaskSetup((context, task) =>
{
    var message = string.Format("Task: {0}", task.Task.Name);
    // custom logging
    if(BuildSystem.IsRunningOnAppVeyor) {
      BuildSystem.AppVeyor.AddInformationalMessage(message);
    }
});

TaskTeardown((context, task) =>
{
    var message = string.Format("Task: {0}", task.Task.Name);
    // custom logging
    if(BuildSystem.IsRunningOnAppVeyor) {
      BuildSystem.AppVeyor.AddInformationalMessage(message);
    }
});

Then further refine this into a common abstraction that can be agnostic of build system and can report messages specific to the current build environment (teamcity system messages, appveyor messages):

TaskSetup((context, task) =>
{
    var message = string.Format("Task: {0}", task.Task.Name);
    // custom logging
    BuildSystem.AddInformationalMessage(message);
});

TaskTeardown((context, task) =>
{
    var message = string.Format("Task: {0}", task.Task.Name);
    // custom logging
    BuildSystem.AddInformationalMessage(message);
});
@gep13
Copy link
Member

gep13 commented Jul 23, 2016

@Philo Thank you for your contribution to Cake!

@gep13 gep13 closed this as completed Jul 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants