mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
Merge pull request #2039 from lucaslorentz/expose-parent-number
Expose parent build number
This commit is contained in:
commit
02f9cf4bd6
2 changed files with 6 additions and 0 deletions
|
@ -144,6 +144,10 @@ var Command = cli.Command{
|
|||
Name: "build-number",
|
||||
EnvVar: "DRONE_BUILD_NUMBER",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "parent-build-number",
|
||||
EnvVar: "DRONE_PARENT_BUILD_NUMBER",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "build-created",
|
||||
EnvVar: "DRONE_BUILD_CREATED",
|
||||
|
@ -389,6 +393,7 @@ func metadataFromContext(c *cli.Context) frontend.Metadata {
|
|||
},
|
||||
Curr: frontend.Build{
|
||||
Number: c.Int("build-number"),
|
||||
Parent: c.Int("parent-build-number"),
|
||||
Created: c.Int64("build-created"),
|
||||
Started: c.Int64("build-started"),
|
||||
Finished: c.Int64("build-finished"),
|
||||
|
|
|
@ -329,6 +329,7 @@ func metadataFromStruct(repo *model.Repo, build, last *model.Build, proc *model.
|
|||
},
|
||||
Curr: frontend.Build{
|
||||
Number: build.Number,
|
||||
Parent: build.Parent,
|
||||
Created: build.Created,
|
||||
Started: build.Started,
|
||||
Finished: build.Finished,
|
||||
|
|
Loading…
Reference in a new issue