Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventPush = "push" EventPull = "pull_request" EventPullClosed = "pull_request_closed" EventTag = "tag" EventRelease = "release" EventDeploy = "deployment" EventCron = "cron" EventManual = "manual" )
Event types corresponding to forge hooks.
View Source
const ( FailureIgnore = "ignore" FailureFail = "fail" )
Different ways to handle failure states.
Variables ¶
This section is empty.
Functions ¶
func EnvVarSubst ¶ added in v2.2.0
func SetDroneEnviron ¶
SetDroneEnviron set dedicated to DroneCI environment vars as compatibility layer. Main purpose is to be compatible with drone plugins.
Types ¶
type Author ¶
type Author struct { Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Avatar string `json:"avatar,omitempty"` }
Author defines runtime metadata for a commit author.
type Commit ¶
type Commit struct { Sha string `json:"sha,omitempty"` Ref string `json:"ref,omitempty"` Refspec string `json:"refspec,omitempty"` Branch string `json:"branch,omitempty"` Message string `json:"message,omitempty"` Author Author `json:"author,omitempty"` ChangedFiles []string `json:"changed_files,omitempty"` PullRequestLabels []string `json:"labels,omitempty"` IsPrerelease bool `json:"is_prerelease,omitempty"` }
Commit defines runtime metadata for a commit.
type Metadata ¶
type Metadata struct { ID string `json:"id,omitempty"` Repo Repo `json:"repo,omitempty"` Curr Pipeline `json:"curr,omitempty"` Prev Pipeline `json:"prev,omitempty"` Workflow Workflow `json:"workflow,omitempty"` Step Step `json:"step,omitempty"` Sys System `json:"sys,omitempty"` Forge Forge `json:"forge,omitempty"` }
Metadata defines runtime m.
type Pipeline ¶
type Pipeline struct { Number int64 `json:"number,omitempty"` Created int64 `json:"created,omitempty"` Started int64 `json:"started,omitempty"` Finished int64 `json:"finished,omitempty"` Status string `json:"status,omitempty"` Event string `json:"event,omitempty"` ForgeURL string `json:"forge_url,omitempty"` DeployTo string `json:"target,omitempty"` DeployTask string `json:"task,omitempty"` Commit Commit `json:"commit,omitempty"` Parent int64 `json:"parent,omitempty"` Cron string `json:"cron,omitempty"` }
Pipeline defines runtime metadata for a pipeline.
type Repo ¶
type Repo struct { ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` Owner string `json:"owner,omitempty"` RemoteID string `json:"remote_id,omitempty"` ForgeURL string `json:"forge_url,omitempty"` CloneURL string `json:"clone_url,omitempty"` CloneSSHURL string `json:"clone_url_ssh,omitempty"` Private bool `json:"private,omitempty"` Secrets []Secret `json:"secrets,omitempty"` Branch string `json:"default_branch,omitempty"` Trusted bool `json:"trusted,omitempty"` }
Repo defines runtime metadata for a repository.
type Secret ¶
type Secret struct { Name string `json:"name,omitempty"` Value string `json:"value,omitempty"` Mount string `json:"mount,omitempty"` Mask bool `json:"mask,omitempty"` }
Secret defines a runtime secret.
type ServerForge ¶
type ServerForge interface { // Name returns the string name of this driver Name() string // URL returns the root url of a configured forge URL() string }
ServerForge represent the needed func of a server forge to get its metadata.
Click to show internal directories.
Click to hide internal directories.