diff --git a/main.go b/main.go index 3820f66..4133cf6 100644 --- a/main.go +++ b/main.go @@ -129,6 +129,11 @@ func main() { Usage: "build link", EnvVar: "DRONE_BUILD_LINK", }, + cli.StringFlag{ + Name: "build.deployTo", + Usage: "environment deployed to", + EnvVar: "DRONE_DEPLOY_TO", + }, cli.Int64Flag{ Name: "build.started", Usage: "build started", @@ -163,18 +168,19 @@ func run(c *cli.Context) error { Name: c.String("repo.name"), }, Build: Build{ - Tag: c.String("build.tag"), - Number: c.Int("build.number"), - Event: c.String("build.event"), - Status: c.String("build.status"), - Commit: c.String("commit.sha"), - Ref: c.String("commit.ref"), - Branch: c.String("commit.branch"), - Author: c.String("commit.author"), - Message: c.String("commit.message"), - Link: c.String("build.link"), - Started: c.Int64("build.started"), - Created: c.Int64("build.created"), + Tag: c.String("build.tag"), + Number: c.Int("build.number"), + Event: c.String("build.event"), + Status: c.String("build.status"), + Commit: c.String("commit.sha"), + Ref: c.String("commit.ref"), + Branch: c.String("commit.branch"), + Author: c.String("commit.author"), + Message: c.String("commit.message"), + Link: c.String("build.link"), + DeployTo: c.String("build.deployTo"), + Started: c.Int64("build.started"), + Created: c.Int64("build.created"), }, Job: Job{ Started: c.Int64("job.started"), diff --git a/plugin.go b/plugin.go index b973f4f..031d260 100644 --- a/plugin.go +++ b/plugin.go @@ -21,18 +21,19 @@ type ( } Build struct { - Tag string `json:"tag"` - Event string `json:"event"` - Number int `json:"number"` - Commit string `json:"commit"` - Ref string `json:"ref"` - Branch string `json:"branch"` - Author string `json:"author"` - Message string `json:"message"` - Status string `json:"status"` - Link string `json:"link"` - Started int64 `json:"started"` - Created int64 `json:"created"` + Tag string `json:"tag"` + Event string `json:"event"` + Number int `json:"number"` + Commit string `json:"commit"` + Ref string `json:"ref"` + Branch string `json:"branch"` + Author string `json:"author"` + Message string `json:"message"` + Status string `json:"status"` + Link string `json:"link"` + DeployTo string `json:"deployTo"` + Started int64 `json:"started"` + Created int64 `json:"created"` } Config struct {