mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 04:11:03 +00:00
included more plugin inputs
This commit is contained in:
parent
6fffa7af26
commit
2b7f46de08
1 changed files with 38 additions and 31 deletions
|
@ -83,6 +83,11 @@ func (r *pipeline) run() error {
|
|||
})
|
||||
}
|
||||
|
||||
var lastStatus string
|
||||
if w.BuildLast != nil {
|
||||
lastStatus = w.BuildLast.Status
|
||||
}
|
||||
|
||||
trans := []compiler.Transform{
|
||||
builtin.NewCloneOp("git", true),
|
||||
builtin.NewCacheOp(
|
||||
|
@ -105,7 +110,7 @@ func (r *pipeline) run() error {
|
|||
builtin.NewAliasOp(prefix),
|
||||
builtin.NewPullOp(r.config.pull),
|
||||
builtin.NewFilterOp(
|
||||
model.StatusSuccess, // TODO(bradrydzewski) please add the last build status here
|
||||
lastStatus,
|
||||
w.Build.Branch,
|
||||
w.Build.Event,
|
||||
w.Build.Deploy,
|
||||
|
@ -236,11 +241,13 @@ func toEnv(w *queue.Work) map[string]string {
|
|||
"DRONE_COMMIT_BRANCH": w.Build.Branch,
|
||||
"DRONE_COMMIT_LINK": w.Build.Link,
|
||||
"DRONE_COMMIT_MESSAGE": w.Build.Message,
|
||||
"DRONE_AUTHOR": w.Build.Author,
|
||||
"DRONE_AUTHOR_EMAIL": w.Build.Email,
|
||||
"DRONE_AUTHOR_AVATAR": w.Build.Avatar,
|
||||
"DRONE_COMMIT_AUTHOR": w.Build.Author,
|
||||
"DRONE_COMMIT_AUTHOR_EMAIL": w.Build.Email,
|
||||
"DRONE_COMMIT_AUTHOR_AVATAR": w.Build.Avatar,
|
||||
"DRONE_BUILD_NUMBER": fmt.Sprintf("%d", w.Build.Number),
|
||||
"DRONE_BUILD_EVENT": w.Build.Event,
|
||||
"DRONE_BUILD_STATUS": w.Build.Status,
|
||||
"DRONE_BUILD_LINK": fmt.Sprintf("%s/%s/%d", w.System.Link, w.Repo.FullName, w.Build.Number),
|
||||
"DRONE_BUILD_CREATED": fmt.Sprintf("%d", w.Build.Created),
|
||||
"DRONE_BUILD_STARTED": fmt.Sprintf("%d", w.Build.Started),
|
||||
"DRONE_BUILD_FINISHED": fmt.Sprintf("%d", w.Build.Finished),
|
||||
|
|
Loading…
Reference in a new issue