using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
public class CiBuildSettings
{
///
/// A command specification (a system command),
/// in order to reference some trusted server-side process
///
public class Command
{
[Required]
[JsonPropertyAttribute("path")]
public string Path { get; set; }
[JsonPropertyAttribute("args")]
public string[] Args { get; set; }
///
/// Specific variables to this process
///
///
///
[JsonPropertyAttribute("env")]
public string[] Environment { get; set; }
[JsonPropertyAttribute("working_dir")]
public string WorkingDir { get; set; }
}
///
/// The global process environment variables
///
///
[JsonPropertyAttribute("env")]
public string[] Environment { get; set; }
///
/// The required building command.
///
///
[Required]
[JsonPropertyAttribute("build")]
public Command Build { get; set; }
///
/// A preparing command.
/// It is optional, but when specified,
/// must end ok in order to launch the build.
///
///
[JsonPropertyAttribute("prepare")]
public Command Prepare { get; set; }
///
/// A post-production command,
/// for an example, some publishing,
/// push in prod env ...
/// only fired on successful build.
///
///
[JsonPropertyAttribute("post_build")]
public Command PostBuild { get; set; }
///
/// Additional emails, as dest of notifications
///
///
[JsonPropertyAttribute("emails")]
public string[] Emails { get; set; }
}