syntax = "proto3";
package rockpaperscissors.events;
option go_package = "events";
option java_package = "tv.justin.rockpaperscissors.proto.events";

import "code.justin.tv/dta/rockpaperscissors/proto/project_metadata.proto";


message JenkinsBuildStats {
  // "dta-rockpaperscissors"
  string job_name = 1;

  // "537"
  string build_id = 2;

  // "https://jenkins.internal.justin.tv/job/dta-rockpaperscissors/537/"
  string url = 3;

  int64 start_time_in_millis = 4;
  int64 duration_in_millis = 5;

  // "jenkins-prod-slave-3"
  string built_on = 6;

  enum Result {
    SUCCESS = 0;
    UNSTABLE = 1;
    FAILURE = 2;
    NOT_BUILT = 3;
    ABORTED = 4;
  }
  Result result = 7;

  // "Started by GitHub push by gribilly"
  string cause = 8;

  GitHubRepository github_repository = 9;

  // "master"
  string branch = 10;

  // 69cb0b8f6d6a4de67eb08f8b0dc9223daed152"
  string commit_id = 11;

  message ChangeSet {
    string commit_id = 1;
    int64 timestamp = 2;
  }
  repeated ChangeSet change_set = 12;
}
