Esempio n. 1
0
 public BuildDto CreateFailedBuild(BuildTypeDto buildType, UserDto user, BuildAgentDto agent, VcsRootInstanceDto instance) => new BuildDto
 {
     Id          = "102",
     BuildTypeId = buildType.Id,
     Number      = "2",
     Status      = BuildStatus.FAILURE,
     State       = "finished",
     StatusText  = "/usr/share/dotnet/sdk/3.1.403/NuGet.targets(128,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. /usr/share/dotnet/sdk/3.1.403/NuGet.targets(128,5): error : Resource temporarily unavailable (new);",
     BuildType   = buildType,
     QueuedDate  = "20210104T093500+0000",
     StartDate   = "20210104T094000+0000",
     FinishDate  = "20210104T095000+0000",
     Triggered   = new TriggeredDto
     {
         User = user
     },
     Revisions = new RevisionsDto
     {
         Revision = new List <RevisionDto>
         {
             new RevisionDto
             {
                 Version         = "2d5fc7874d73d0e4b7ae555bd00be14f79b76154",
                 VcsBranchName   = "refs/heads/master",
                 VcsRootInstance = instance
             }
         }
     },
     Agent = agent
 };
Esempio n. 2
0
 public BuildDto CreateOKBuild(BuildTypeDto buildType, UserDto user, BuildAgentDto agent, VcsRootInstanceDto instance) => new BuildDto
 {
     Id            = "101",
     BuildTypeId   = buildType.Id,
     Number        = "1",
     Status        = BuildStatus.SUCCESS,
     State         = "finished",
     BranchName    = "refs/heads/master",
     DefaultBranch = true,
     StatusText    = "Tests passed: 56",
     BuildType     = buildType,
     QueuedDate    = "20210103T093500+0000",
     StartDate     = "20210103T094000+0000",
     FinishDate    = "20210103T095000+0000",
     Triggered     = new TriggeredDto
     {
         User = user
     },
     Comment = new BuildCommentDto
     {
         User      = user,
         Timestamp = "20210103T093500+0000",
         Text      = "Building"
     },
     Revisions = new RevisionsDto
     {
         Revision = new List <RevisionDto>
         {
             new RevisionDto
             {
                 Version         = "54f7ef0ebcc5be2f59a66543034740c9b7383cec",
                 VcsBranchName   = "refs/heads/master",
                 VcsRootInstance = instance
             }
         }
     },
     Agent      = agent,
     Properties = new ParametersDto
     {
         Property = new List <ParameterDto>
         {
             new ParameterDto("param1", "value1")
         }
     },
     Tags = new TagsDto
     {
         Tag = new List <TagDto>
         {
             new TagDto
             {
                 Name = "Release #1"
             }
         }
     }
 };