mirror of
https://github.com/thegeeklab/wp-plugin-go.git
synced 2024-11-13 03:10:39 +00:00
a20f13fdb0
I have split the code into various files and beside that I have also used more flat package structure. I have removed the whole constants for flag names and environment variables, since nobody got to write these flags manually anyway as all these variables are assigned to structs all can benefit form code completion while this lib stays more readable. Signed-off-by: Thomas Boerger <thomas@webhippie.de>
63 lines
1.2 KiB
Go
63 lines
1.2 KiB
Go
// Copyright (c) 2019, the Drone Plugins project authors.
|
|
// Please see the AUTHORS file for details. All rights reserved.
|
|
// 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
|
|
|
|
// 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
|
|
|
|
// FailedStages of the build.
|
|
FailedStages []string
|
|
|
|
// FailedSteps of the build.
|
|
FailedSteps []string
|
|
}
|