2022-05-03 20:03:37 +00:00
|
|
|
// Copyright (c) 2019, Drone Plugins project authors
|
|
|
|
// Copyright (c) 2021, Robert Kaussow <mail@thegeeklab.de>
|
|
|
|
|
2019-12-20 20:47:50 +00:00
|
|
|
// Use of this source code is governed by an Apache 2.0 license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
package drone
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Build represents a build of a repository.
|
|
|
|
type Build struct {
|
|
|
|
// Branch defines the branch name of the build.
|
|
|
|
Branch string
|
|
|
|
|
|
|
|
// PullRequest number of the build.
|
|
|
|
PullRequest int
|
|
|
|
|
|
|
|
// Tag of the build.
|
|
|
|
Tag string
|
|
|
|
|
|
|
|
// SourceBranch for the pull request.
|
|
|
|
SourceBranch string
|
|
|
|
|
|
|
|
// TargetBranch for the pull request.
|
|
|
|
TargetBranch string
|
|
|
|
|
|
|
|
// Number for the build.
|
|
|
|
Number int
|
|
|
|
|
|
|
|
// Parent build number for the build.
|
|
|
|
Parent int
|
|
|
|
|
|
|
|
// Event that triggered the build.
|
|
|
|
Event string
|
|
|
|
|
|
|
|
// Action that triggered the build. This value is used to differentiate
|
|
|
|
// bettween a pull request being opened vs synchronized.
|
|
|
|
Action string
|
|
|
|
|
|
|
|
// Status of the build.
|
|
|
|
Status string
|
|
|
|
|
2020-09-11 13:35:41 +00:00
|
|
|
// Link to the build.
|
|
|
|
Link string
|
|
|
|
|
2019-12-20 20:47:50 +00:00
|
|
|
// Created time of the build.
|
|
|
|
Created time.Time
|
|
|
|
|
|
|
|
// Started time of the build.
|
|
|
|
Started time.Time
|
|
|
|
|
|
|
|
// Finished time of the build.
|
|
|
|
Finished time.Time
|
|
|
|
|
|
|
|
// DeployTo the environment.
|
|
|
|
DeployTo string
|
|
|
|
|
2020-09-11 13:35:41 +00:00
|
|
|
// DeployID for the environment.
|
|
|
|
DeployID int
|
|
|
|
|
2019-12-20 20:47:50 +00:00
|
|
|
// FailedStages of the build.
|
|
|
|
FailedStages []string
|
|
|
|
|
|
|
|
// FailedSteps of the build.
|
|
|
|
FailedSteps []string
|
|
|
|
}
|