Documentation ¶
Index ¶
- Constants
- func ResetConfigProvider()
- type ChangeSet
- type ConfigProvider
- type Options
- type Orchestrator
- type PullRequestConfig
- type UnknownOrchestratorConfigProvider
- func (u *UnknownOrchestratorConfigProvider) Branch() string
- func (u *UnknownOrchestratorConfigProvider) BuildID() string
- func (u *UnknownOrchestratorConfigProvider) BuildReason() string
- func (u *UnknownOrchestratorConfigProvider) BuildStatus() string
- func (u *UnknownOrchestratorConfigProvider) BuildURL() string
- func (u *UnknownOrchestratorConfigProvider) ChangeSets() []ChangeSet
- func (u *UnknownOrchestratorConfigProvider) CommitSHA() string
- func (u *UnknownOrchestratorConfigProvider) Configure(_ *Options) error
- func (u *UnknownOrchestratorConfigProvider) FullLogs() ([]byte, error)
- func (u *UnknownOrchestratorConfigProvider) GitReference() string
- func (u *UnknownOrchestratorConfigProvider) IsPullRequest() bool
- func (u *UnknownOrchestratorConfigProvider) JobName() string
- func (u *UnknownOrchestratorConfigProvider) JobURL() string
- func (u *UnknownOrchestratorConfigProvider) OrchestratorType() string
- func (u *UnknownOrchestratorConfigProvider) OrchestratorVersion() string
- func (u *UnknownOrchestratorConfigProvider) PipelineStartTime() time.Time
- func (u *UnknownOrchestratorConfigProvider) PullRequestConfig() PullRequestConfig
- func (u *UnknownOrchestratorConfigProvider) RepoURL() string
- func (u *UnknownOrchestratorConfigProvider) StageName() string
Constants ¶
View Source
const ( BuildStatusSuccess = "SUCCESS" BuildStatusAborted = "ABORTED" BuildStatusFailure = "FAILURE" BuildStatusInProgress = "IN_PROGRESS" BuildReasonManual = "Manual" BuildReasonSchedule = "Schedule" BuildReasonPullRequest = "PullRequest" BuildReasonResourceTrigger = "ResourceTrigger" BuildReasonIndividualCI = "IndividualCI" BuildReasonUnknown = "Unknown" )
Variables ¶
This section is empty.
Functions ¶
func ResetConfigProvider ¶ added in v1.333.0
func ResetConfigProvider()
ResetConfigProvider is intended to be used only for unit tests because some of these tests run with different environment variables (for example, mock runs in various orchestrators). Usage in production code is not recommended.
Types ¶
type ConfigProvider ¶ added in v1.333.0
type ConfigProvider interface { Configure(opts *Options) error OrchestratorType() string OrchestratorVersion() string StageName() string Branch() string GitReference() string RepoURL() string BuildURL() string BuildID() string BuildStatus() string BuildReason() string JobURL() string JobName() string CommitSHA() string PullRequestConfig() PullRequestConfig IsPullRequest() bool FullLogs() ([]byte, error) PipelineStartTime() time.Time ChangeSets() []ChangeSet }
func GetOrchestratorConfigProvider ¶ added in v1.333.0
func GetOrchestratorConfigProvider(opts *Options) (ConfigProvider, error)
type Options ¶ added in v1.333.0
type Options struct { JenkinsUsername string JenkinsToken string AzureToken string GitHubToken string }
Options used to set orchestrator specific settings.
type Orchestrator ¶
type Orchestrator int
const ( Unknown Orchestrator = iota AzureDevOps GitHubActions Jenkins )
func DetectOrchestrator ¶
func DetectOrchestrator() Orchestrator
DetectOrchestrator function determines in which orchestrator Piper is running by examining environment variables.
func (Orchestrator) String ¶
func (o Orchestrator) String() string
type PullRequestConfig ¶
type UnknownOrchestratorConfigProvider ¶ added in v1.180.0
type UnknownOrchestratorConfigProvider struct{}
func (*UnknownOrchestratorConfigProvider) Branch ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) Branch() string
func (*UnknownOrchestratorConfigProvider) BuildID ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) BuildID() string
func (*UnknownOrchestratorConfigProvider) BuildReason ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) BuildReason() string
func (*UnknownOrchestratorConfigProvider) BuildStatus ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) BuildStatus() string
func (*UnknownOrchestratorConfigProvider) BuildURL ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) BuildURL() string
func (*UnknownOrchestratorConfigProvider) ChangeSets ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) ChangeSets() []ChangeSet
func (*UnknownOrchestratorConfigProvider) CommitSHA ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) CommitSHA() string
func (*UnknownOrchestratorConfigProvider) Configure ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) Configure(_ *Options) error
func (*UnknownOrchestratorConfigProvider) FullLogs ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) FullLogs() ([]byte, error)
func (*UnknownOrchestratorConfigProvider) GitReference ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) GitReference() string
func (*UnknownOrchestratorConfigProvider) IsPullRequest ¶ added in v1.180.0
func (u *UnknownOrchestratorConfigProvider) IsPullRequest() bool
func (*UnknownOrchestratorConfigProvider) JobName ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) JobName() string
func (*UnknownOrchestratorConfigProvider) JobURL ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) JobURL() string
func (*UnknownOrchestratorConfigProvider) OrchestratorType ¶ added in v1.180.0
func (u *UnknownOrchestratorConfigProvider) OrchestratorType() string
func (*UnknownOrchestratorConfigProvider) OrchestratorVersion ¶ added in v1.180.0
func (u *UnknownOrchestratorConfigProvider) OrchestratorVersion() string
func (*UnknownOrchestratorConfigProvider) PipelineStartTime ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) PipelineStartTime() time.Time
func (*UnknownOrchestratorConfigProvider) PullRequestConfig ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) PullRequestConfig() PullRequestConfig
func (*UnknownOrchestratorConfigProvider) RepoURL ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) RepoURL() string
func (*UnknownOrchestratorConfigProvider) StageName ¶ added in v1.333.0
func (u *UnknownOrchestratorConfigProvider) StageName() string
Click to show internal directories.
Click to hide internal directories.